feat: add serial api support (#25237)
* feat: add serial api support resolves #22478 * Put serial port support behind a flag and mark as experimental * Update docs/api/session.md Co-authored-by: Jeremy Rose <jeremya@chromium.org> * Use enable-blink-features=Serial instead of enable-experimental-web-platform-features * Set enableBlinkFeatures on webPreferences instead of commandline Co-authored-by: Jeremy Rose <jeremya@chromium.org>
This commit is contained in:
parent
bed50bb73c
commit
fd63510ca9
19 changed files with 936 additions and 1 deletions
|
@ -86,6 +86,7 @@
|
|||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
#include "shell/browser/notifications/platform_notification_service.h"
|
||||
#include "shell/browser/protocol_registry.h"
|
||||
#include "shell/browser/serial/electron_serial_delegate.h"
|
||||
#include "shell/browser/session_preferences.h"
|
||||
#include "shell/browser/ui/devtools_manager_delegate.h"
|
||||
#include "shell/browser/web_contents_permission_helper.h"
|
||||
|
@ -1747,4 +1748,10 @@ ElectronBrowserClient::GetPluginMimeTypesWithExternalHandlers(
|
|||
return mime_types;
|
||||
}
|
||||
|
||||
content::SerialDelegate* ElectronBrowserClient::GetSerialDelegate() {
|
||||
if (!serial_delegate_)
|
||||
serial_delegate_ = std::make_unique<ElectronSerialDelegate>();
|
||||
return serial_delegate_.get();
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue