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
|
@ -18,6 +18,7 @@
|
|||
#include "content/public/browser/web_contents.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "net/ssl/client_cert_identity.h"
|
||||
#include "shell/browser/serial/electron_serial_delegate.h"
|
||||
|
||||
namespace content {
|
||||
class ClientCertificateDelegate;
|
||||
|
@ -82,6 +83,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
|
||||
void SetCanUseCustomSiteInstance(bool should_disable);
|
||||
bool CanUseCustomSiteInstance() override;
|
||||
content::SerialDelegate* GetSerialDelegate() override;
|
||||
|
||||
protected:
|
||||
void RenderProcessWillLaunch(content::RenderProcessHost* host) override;
|
||||
|
@ -335,6 +337,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
|||
// ProxyingWebSocket classes.
|
||||
uint64_t next_id_ = 0;
|
||||
|
||||
std::unique_ptr<ElectronSerialDelegate> serial_delegate_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserClient);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue