chore: bump chromium to 140.0.7281.0 (38-x-y) (#47559)
* chore: bump chromium in DEPS to 139.0.7258.6 * chore: bump chromium in DEPS to 139.0.7258.5 * chore: bump chromium in DEPS to 140.0.7270.1 * chore: bump chromium in DEPS to 140.0.7271.1 * chore: bump chromium in DEPS to 140.0.7273.0 * chore: bump chromium in DEPS to 140.0.7273.1 * chore: bump chromium in DEPS to 140.0.7275.1 * chore: bump chromium in DEPS to 140.0.7275.4 * chore: bump chromium in DEPS to 140.0.7277.1 * chore: bump chromium in DEPS to 140.0.7279.1 * chore: bump chromium in DEPS to 140.0.7281.1 * chore: bump chromium in DEPS to 140.0.7283.1 * chore: bump chromium in DEPS to 140.0.7285.1 * chore: bump chromium in DEPS to 140.0.7287.1 * chore: bump chromium in DEPS to 140.0.7289.0 * chore: bump chromium in DEPS to 140.0.7289.1 * chore: bump chromium in DEPS to 140.0.7291.1 * chore: bump chromium in DEPS to 140.0.7293.1 * chore: bump chromium in DEPS to 140.0.7295.1 * chore: bump chromium in DEPS to 140.0.7296.0 * chore: bump chromium to 140.0.7281.0 (main) (#47616) cherry picked from603cafad7e
* chore: bump chromium in DEPS to 140.0.7269.2 * chore: bump chromium in DEPS to 140.0.7270.0 * chore: bump chromium in DEPS to 140.0.7271.0 * chore: bump chromium in DEPS to 140.0.7273.0 * 6516731: [ExclusiveAccessForAndroid] remove unneeded includes & deps | https://chromium-review.googlesource.com/c/chromium/src/+/6516731 * 6694809: dbus: Ensure systemd scope is started before using any portal services | https://chromium-review.googlesource.com/c/chromium/src/+/6694809 * chore: patch chromium * chore: export patches * chore: bump chromium in DEPS to 140.0.7275.0 * 6677511: [pepper] More pepper removal | https://chromium-review.googlesource.com/c/chromium/src/+/6677511 * 6513641: [gin] Rename gin::Wrappable to gin::DeprecatedWrappable | https://chromium-review.googlesource.com/c/chromium/src/+/6513641 * chore: export chromium patches * 6513641: [gin] Rename gin::Wrappable to gin::DeprecatedWrappable | https://chromium-review.googlesource.com/c/chromium/src/+/6513641 * chore: bump chromium in DEPS to 140.0.7277.0 * chore: bump chromium in DEPS to 140.0.7279.0 * chore: bump chromium in DEPS to 140.0.7281.0 * 6677314: Plumb enabled client hints in the network requestion to network layer https://chromium-review.googlesource.com/c/chromium/src/+/6677314 * 6351556: [source-phase-imports] Support Wasm Source Phase Imports https://chromium-review.googlesource.com/c/chromium/src/+/6351556 * 6700077: [renderer] Avoid calls to deprecated GetIsolate methods https://chromium-review.googlesource.com/c/chromium/src/+/6700077 * 6692873: Reland "Reland "FSA: Only normalize the hardcoded rules once during initialization"" https://chromium-review.googlesource.com/c/chromium/src/+/6692873 * 6686234: [gin] Cleanup NamedPropertyInterceptor for Wrappable https://chromium-review.googlesource.com/c/chromium/src/+/6686234 * chore: export patches * 6667723: Remove content_enable_legacy_ipc GN arg. https://chromium-review.googlesource.com/c/chromium/src/+/6667723 * 6646566: ui: Move NativeWindowTracker to its own directory https://chromium-review.googlesource.com/c/chromium/src/+/6646566 * fix: add missing includes * 6580522: [WAR, DNR] Fix unsafe redirect error to web accessible resource https://chromium-review.googlesource.com/c/chromium/src/+/6580522 * 6680477: Implement `completeCode` endpoint and expose to DevTools https://chromium-review.googlesource.com/c/chromium/src/+/6680477 * 6677511: [pepper] More pepper removal https://chromium-review.googlesource.com/c/chromium/src/+/6677511 * 6696689: Rename views::WidgetFocusManager -> NativeViewFocusManager https://chromium-review.googlesource.com/c/chromium/src/+/6696689 * 6702812: Move wtf/text/string_impl*.* to "blink" namespace https://chromium-review.googlesource.com/c/chromium/src/+/6702812 * chore: fix dialog patch * 6702431: [animation-trigger] Parse timeline-trigger-name https://chromium-review.googlesource.com/c/chromium/src/+/6702431 * chore: fixup patch indices * feat: replace webFrame.routingId with webFrame.frameToken * feat: WebFrameMain.prototype.frameToken * test: refactor to use replacement APIs * chore: fixup pip patch * test: adjust webFrame tests for frameToken changes * 6703757: Reland "Enable -fsanitize=array-bounds in non-UBSan builds" https://chromium-review.googlesource.com/c/chromium/src/+/6703757 * test: switch to frameTokens * test: routingId is fine to test in the main process * docs: add routingId to breaking changes * docs: update plugin-crashed event * chore: fixup linux dialog patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> (cherry picked from commit603cafad7e
) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
This commit is contained in:
parent
96957aebf3
commit
2783f76f1f
174 changed files with 873 additions and 640 deletions
|
@ -365,7 +365,7 @@ struct Converter<net::SecureDnsMode> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo App::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo App::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ enum class JumpListResult : int;
|
|||
namespace api {
|
||||
|
||||
class App final : public ElectronBrowserClient::Delegate,
|
||||
public gin::Wrappable<App>,
|
||||
public gin::DeprecatedWrappable<App>,
|
||||
public gin_helper::EventEmitterMixin<App>,
|
||||
private BrowserObserver,
|
||||
private content::GpuDataManagerObserver,
|
||||
|
@ -67,7 +67,7 @@ class App final : public ElectronBrowserClient::Delegate,
|
|||
static App* Get();
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo AutoUpdater::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo AutoUpdater::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
AutoUpdater::AutoUpdater() {
|
||||
auto_updater::AutoUpdater::SetDelegate(this);
|
||||
|
|
|
@ -19,7 +19,7 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class AutoUpdater final : public gin::Wrappable<AutoUpdater>,
|
||||
class AutoUpdater final : public gin::DeprecatedWrappable<AutoUpdater>,
|
||||
public gin_helper::EventEmitterMixin<AutoUpdater>,
|
||||
public auto_updater::Delegate,
|
||||
private WindowListObserver {
|
||||
|
@ -27,7 +27,7 @@ class AutoUpdater final : public gin::Wrappable<AutoUpdater>,
|
|||
static gin::Handle<AutoUpdater> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -274,7 +274,7 @@ std::string StringToCookieSameSite(const std::string* str_ptr,
|
|||
|
||||
} // namespace
|
||||
|
||||
gin::WrapperInfo Cookies::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Cookies::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Cookies::Cookies(ElectronBrowserContext* browser_context)
|
||||
: browser_context_{browser_context} {
|
||||
|
|
|
@ -33,14 +33,14 @@ class ElectronBrowserContext;
|
|||
|
||||
namespace api {
|
||||
|
||||
class Cookies final : public gin::Wrappable<Cookies>,
|
||||
class Cookies final : public gin::DeprecatedWrappable<Cookies>,
|
||||
public gin_helper::EventEmitterMixin<Cookies> {
|
||||
public:
|
||||
static gin::Handle<Cookies> Create(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -143,7 +143,8 @@ class DataPipeReader {
|
|||
|
||||
} // namespace
|
||||
|
||||
gin::WrapperInfo DataPipeHolder::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo DataPipeHolder::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
DataPipeHolder::DataPipeHolder(const network::DataElement& element)
|
||||
: id_(base::NumberToString(++g_next_id)) {
|
||||
|
|
|
@ -20,10 +20,10 @@ class Handle;
|
|||
namespace electron::api {
|
||||
|
||||
// Retains reference to the data pipe.
|
||||
class DataPipeHolder final : public gin::Wrappable<DataPipeHolder> {
|
||||
class DataPipeHolder final : public gin::DeprecatedWrappable<DataPipeHolder> {
|
||||
public:
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
static gin::Handle<DataPipeHolder> Create(
|
||||
|
|
|
@ -24,7 +24,7 @@ using content::DevToolsAgentHost;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Debugger::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Debugger::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Debugger::Debugger(v8::Isolate* isolate, content::WebContents* web_contents)
|
||||
: content::WebContentsObserver(web_contents), web_contents_(web_contents) {}
|
||||
|
|
|
@ -32,7 +32,7 @@ class Promise;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class Debugger final : public gin::Wrappable<Debugger>,
|
||||
class Debugger final : public gin::DeprecatedWrappable<Debugger>,
|
||||
public gin_helper::EventEmitterMixin<Debugger>,
|
||||
public content::DevToolsAgentHostClient,
|
||||
private content::WebContentsObserver {
|
||||
|
@ -41,7 +41,7 @@ class Debugger final : public gin::Wrappable<Debugger>,
|
|||
content::WebContents* web_contents);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -218,7 +218,8 @@ struct Converter<electron::api::DesktopCapturer::Source> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo DesktopCapturer::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo DesktopCapturer::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
DesktopCapturer::DesktopCapturer(v8::Isolate* isolate) {}
|
||||
|
||||
|
@ -521,7 +522,8 @@ bool DesktopCapturer::IsDisplayMediaSystemPickerAvailable() {
|
|||
|
||||
gin::ObjectTemplateBuilder DesktopCapturer::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<DesktopCapturer>::GetObjectTemplateBuilder(isolate)
|
||||
return gin::DeprecatedWrappable<DesktopCapturer>::GetObjectTemplateBuilder(
|
||||
isolate)
|
||||
.SetMethod("startHandling", &DesktopCapturer::StartHandling);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class DesktopCapturer final : public gin::Wrappable<DesktopCapturer>,
|
||||
class DesktopCapturer final : public gin::DeprecatedWrappable<DesktopCapturer>,
|
||||
public gin_helper::Pinnable<DesktopCapturer>,
|
||||
private DesktopMediaListObserver {
|
||||
public:
|
||||
|
@ -44,7 +44,7 @@ class DesktopCapturer final : public gin::Wrappable<DesktopCapturer>,
|
|||
bool fetch_window_icons);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -68,7 +68,8 @@ const void* kElectronApiDownloadItemKey = &kElectronApiDownloadItemKey;
|
|||
|
||||
} // namespace
|
||||
|
||||
gin::WrapperInfo DownloadItem::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo DownloadItem::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
// static
|
||||
DownloadItem* DownloadItem::FromDownloadItem(download::DownloadItem* item) {
|
||||
|
|
|
@ -25,7 +25,7 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class DownloadItem final : public gin::Wrappable<DownloadItem>,
|
||||
class DownloadItem final : public gin::DeprecatedWrappable<DownloadItem>,
|
||||
public gin_helper::Pinnable<DownloadItem>,
|
||||
public gin_helper::EventEmitterMixin<DownloadItem>,
|
||||
private download::DownloadItem::Observer {
|
||||
|
@ -36,7 +36,7 @@ class DownloadItem final : public gin::Wrappable<DownloadItem>,
|
|||
static DownloadItem* FromDownloadItem(download::DownloadItem* item);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Extensions::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Extensions::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Extensions::Extensions(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context)
|
||||
|
|
|
@ -22,7 +22,7 @@ class ElectronBrowserContext;
|
|||
|
||||
namespace api {
|
||||
|
||||
class Extensions final : public gin::Wrappable<Extensions>,
|
||||
class Extensions final : public gin::DeprecatedWrappable<Extensions>,
|
||||
public gin_helper::EventEmitterMixin<Extensions>,
|
||||
private extensions::ExtensionRegistryObserver {
|
||||
public:
|
||||
|
@ -31,7 +31,7 @@ class Extensions final : public gin::Wrappable<Extensions>,
|
|||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -49,7 +49,8 @@ bool MapHasMediaKeys(
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo GlobalShortcut::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo GlobalShortcut::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
GlobalShortcut::GlobalShortcut() {}
|
||||
|
||||
|
@ -225,7 +226,8 @@ gin::Handle<GlobalShortcut> GlobalShortcut::Create(v8::Isolate* isolate) {
|
|||
// static
|
||||
gin::ObjectTemplateBuilder GlobalShortcut::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<GlobalShortcut>::GetObjectTemplateBuilder(isolate)
|
||||
return gin::DeprecatedWrappable<GlobalShortcut>::GetObjectTemplateBuilder(
|
||||
isolate)
|
||||
.SetMethod("registerAll", &GlobalShortcut::RegisterAll)
|
||||
.SetMethod("register", &GlobalShortcut::Register)
|
||||
.SetMethod("isRegistered", &GlobalShortcut::IsRegistered)
|
||||
|
|
|
@ -22,12 +22,12 @@ class Handle;
|
|||
namespace electron::api {
|
||||
|
||||
class GlobalShortcut final : private ui::GlobalAcceleratorListener::Observer,
|
||||
public gin::Wrappable<GlobalShortcut> {
|
||||
public gin::DeprecatedWrappable<GlobalShortcut> {
|
||||
public:
|
||||
static gin::Handle<GlobalShortcut> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -130,7 +130,8 @@ struct Converter<in_app_purchase::Product> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo InAppPurchase::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo InAppPurchase::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
// static
|
||||
|
|
|
@ -22,14 +22,14 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class InAppPurchase final : public gin::Wrappable<InAppPurchase>,
|
||||
class InAppPurchase final : public gin::DeprecatedWrappable<InAppPurchase>,
|
||||
public gin_helper::EventEmitterMixin<InAppPurchase>,
|
||||
private in_app_purchase::TransactionObserver {
|
||||
public:
|
||||
static gin::Handle<InAppPurchase> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -50,7 +50,7 @@ struct Converter<SharingItem> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Menu::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Menu::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Menu::Menu(gin::Arguments* args)
|
||||
: model_(std::make_unique<ElectronMenuModel>(this)) {
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace electron::api {
|
|||
class BaseWindow;
|
||||
class WebFrameMain;
|
||||
|
||||
class Menu : public gin::Wrappable<Menu>,
|
||||
class Menu : public gin::DeprecatedWrappable<Menu>,
|
||||
public gin_helper::EventEmitterMixin<Menu>,
|
||||
public gin_helper::Constructible<Menu>,
|
||||
public gin_helper::Pinnable<Menu>,
|
||||
|
@ -37,7 +37,7 @@ class Menu : public gin::Wrappable<Menu>,
|
|||
static const char* GetClassName() { return "Menu"; }
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo NativeTheme::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo NativeTheme::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
NativeTheme::NativeTheme(v8::Isolate* isolate,
|
||||
ui::NativeTheme* ui_theme,
|
||||
|
|
|
@ -18,14 +18,14 @@ class handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class NativeTheme final : public gin::Wrappable<NativeTheme>,
|
||||
class NativeTheme final : public gin::DeprecatedWrappable<NativeTheme>,
|
||||
public gin_helper::EventEmitterMixin<NativeTheme>,
|
||||
private ui::NativeThemeObserver {
|
||||
public:
|
||||
static gin::Handle<NativeTheme> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -79,7 +79,7 @@ void ResolvePromiseWithNetError(gin_helper::Promise<void> promise,
|
|||
|
||||
namespace api {
|
||||
|
||||
gin::WrapperInfo NetLog::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo NetLog::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
NetLog::NetLog(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
|
@ -219,7 +219,7 @@ v8::Local<v8::Promise> NetLog::StopLogging(gin::Arguments* args) {
|
|||
|
||||
gin::ObjectTemplateBuilder NetLog::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<NetLog>::GetObjectTemplateBuilder(isolate)
|
||||
return gin::DeprecatedWrappable<NetLog>::GetObjectTemplateBuilder(isolate)
|
||||
.SetProperty("currentlyLogging", &NetLog::IsCurrentlyLogging)
|
||||
.SetMethod("startLogging", &NetLog::StartLogging)
|
||||
.SetMethod("stopLogging", &NetLog::StopLogging);
|
||||
|
|
|
@ -35,7 +35,7 @@ class ElectronBrowserContext;
|
|||
namespace api {
|
||||
|
||||
// The code is referenced from the net_log::NetExportFileWriter class.
|
||||
class NetLog final : public gin::Wrappable<NetLog> {
|
||||
class NetLog final : public gin::DeprecatedWrappable<NetLog> {
|
||||
public:
|
||||
static gin::Handle<NetLog> Create(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
@ -46,7 +46,7 @@ class NetLog final : public gin::Wrappable<NetLog> {
|
|||
bool IsCurrentlyLogging() const;
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -47,7 +47,8 @@ struct Converter<electron::NotificationAction> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Notification::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Notification::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
Notification::Notification(gin::Arguments* args) {
|
||||
presenter_ = static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
|
|
|
@ -30,7 +30,7 @@ class ErrorThrower;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class Notification final : public gin::Wrappable<Notification>,
|
||||
class Notification final : public gin::DeprecatedWrappable<Notification>,
|
||||
public gin_helper::EventEmitterMixin<Notification>,
|
||||
public gin_helper::Constructible<Notification>,
|
||||
public gin_helper::CleanedUpAtExit,
|
||||
|
@ -54,7 +54,7 @@ class Notification final : public gin::Wrappable<Notification>,
|
|||
void NotificationFailed(const std::string& error) override;
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
// gin_helper::CleanedUpAtExit
|
||||
|
|
|
@ -60,7 +60,8 @@ struct Converter<base::PowerThermalObserver::DeviceThermalState> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo PowerMonitor::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo PowerMonitor::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
PowerMonitor::PowerMonitor(v8::Isolate* isolate) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class PowerMonitor final : public gin::Wrappable<PowerMonitor>,
|
||||
class PowerMonitor final : public gin::DeprecatedWrappable<PowerMonitor>,
|
||||
public gin_helper::EventEmitterMixin<PowerMonitor>,
|
||||
public gin_helper::Pinnable<PowerMonitor>,
|
||||
private base::PowerStateObserver,
|
||||
|
@ -27,7 +27,7 @@ class PowerMonitor final : public gin::Wrappable<PowerMonitor>,
|
|||
static v8::Local<v8::Value> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -40,7 +40,8 @@ struct Converter<device::mojom::WakeLockType> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo PowerSaveBlocker::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo PowerSaveBlocker::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
PowerSaveBlocker::PowerSaveBlocker(v8::Isolate* isolate)
|
||||
: current_lock_type_(device::mojom::WakeLockType::kPreventAppSuspension) {}
|
||||
|
@ -119,7 +120,8 @@ gin::Handle<PowerSaveBlocker> PowerSaveBlocker::Create(v8::Isolate* isolate) {
|
|||
|
||||
gin::ObjectTemplateBuilder PowerSaveBlocker::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<PowerSaveBlocker>::GetObjectTemplateBuilder(isolate)
|
||||
return gin::DeprecatedWrappable<PowerSaveBlocker>::GetObjectTemplateBuilder(
|
||||
isolate)
|
||||
.SetMethod("start", &PowerSaveBlocker::Start)
|
||||
.SetMethod("stop", &PowerSaveBlocker::Stop)
|
||||
.SetMethod("isStarted", &PowerSaveBlocker::IsStarted);
|
||||
|
|
|
@ -19,12 +19,13 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class PowerSaveBlocker final : public gin::Wrappable<PowerSaveBlocker> {
|
||||
class PowerSaveBlocker final
|
||||
: public gin::DeprecatedWrappable<PowerSaveBlocker> {
|
||||
public:
|
||||
static gin::Handle<PowerSaveBlocker> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -86,7 +86,7 @@ struct Converter<CustomScheme> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Protocol::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Protocol::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
const std::vector<std::string>& GetStandardSchemes() {
|
||||
return g_standard_schemes;
|
||||
|
|
|
@ -35,7 +35,7 @@ void RegisterSchemesAsPrivileged(gin_helper::ErrorThrower thrower,
|
|||
v8::Local<v8::Value> val);
|
||||
|
||||
// Protocol implementation based on network services.
|
||||
class Protocol final : public gin::Wrappable<Protocol>,
|
||||
class Protocol final : public gin::DeprecatedWrappable<Protocol>,
|
||||
public gin_helper::Constructible<Protocol> {
|
||||
public:
|
||||
static gin::Handle<Protocol> Create(v8::Isolate* isolate,
|
||||
|
@ -49,7 +49,7 @@ class Protocol final : public gin::Wrappable<Protocol>,
|
|||
static const char* GetClassName() { return "Protocol"; }
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -13,7 +13,8 @@ namespace electron::api {
|
|||
|
||||
PushNotifications* g_push_notifications = nullptr;
|
||||
|
||||
gin::WrapperInfo PushNotifications::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo PushNotifications::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
PushNotifications::PushNotifications() = default;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace electron::api {
|
|||
|
||||
class PushNotifications final
|
||||
: public ElectronBrowserClient::Delegate,
|
||||
public gin::Wrappable<PushNotifications>,
|
||||
public gin::DeprecatedWrappable<PushNotifications>,
|
||||
public gin_helper::EventEmitterMixin<PushNotifications>,
|
||||
private BrowserObserver {
|
||||
public:
|
||||
|
@ -31,7 +31,7 @@ class PushNotifications final
|
|||
static gin::Handle<PushNotifications> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Screen::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Screen::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -26,13 +26,13 @@ class ErrorThrower;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class Screen final : public gin::Wrappable<Screen>,
|
||||
class Screen final : public gin::DeprecatedWrappable<Screen>,
|
||||
public gin_helper::EventEmitterMixin<Screen>,
|
||||
private display::DisplayObserver {
|
||||
public:
|
||||
static v8::Local<v8::Value> Create(gin_helper::ErrorThrower error_thrower);
|
||||
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -75,7 +75,8 @@ v8::Local<v8::Value> ServiceWorkerRunningInfoToDict(
|
|||
|
||||
} // namespace
|
||||
|
||||
gin::WrapperInfo ServiceWorkerContext::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo ServiceWorkerContext::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
ServiceWorkerContext::ServiceWorkerContext(
|
||||
v8::Isolate* isolate,
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace api {
|
|||
class ServiceWorkerMain;
|
||||
|
||||
class ServiceWorkerContext final
|
||||
: public gin::Wrappable<ServiceWorkerContext>,
|
||||
: public gin::DeprecatedWrappable<ServiceWorkerContext>,
|
||||
public gin_helper::EventEmitterMixin<ServiceWorkerContext>,
|
||||
private content::ServiceWorkerContextObserver {
|
||||
public:
|
||||
|
@ -80,7 +80,7 @@ class ServiceWorkerContext final
|
|||
void OnDestruct(content::ServiceWorkerContext* context) override;
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -82,7 +82,8 @@ ServiceWorkerMain* ServiceWorkerMain::FromVersionID(
|
|||
return FromServiceWorkerKey(key);
|
||||
}
|
||||
|
||||
gin::WrapperInfo ServiceWorkerMain::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo ServiceWorkerMain::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
ServiceWorkerMain::ServiceWorkerMain(content::ServiceWorkerContext* sw_context,
|
||||
int64_t version_id,
|
||||
|
|
|
@ -79,7 +79,7 @@ struct ServiceWorkerKey {
|
|||
// StoragePartition in which they're registered. In Electron, this is always
|
||||
// the default StoragePartition for the associated BrowserContext.
|
||||
class ServiceWorkerMain final
|
||||
: public gin::Wrappable<ServiceWorkerMain>,
|
||||
: public gin::DeprecatedWrappable<ServiceWorkerMain>,
|
||||
public gin_helper::EventEmitterMixin<ServiceWorkerMain>,
|
||||
public gin_helper::Pinnable<ServiceWorkerMain>,
|
||||
public gin_helper::Constructible<ServiceWorkerMain> {
|
||||
|
@ -101,7 +101,7 @@ class ServiceWorkerMain final
|
|||
static const char* GetClassName() { return "ServiceWorkerMain"; }
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
// disable copy
|
||||
|
|
|
@ -552,7 +552,7 @@ const void* kElectronApiSessionKey = &kElectronApiSessionKey;
|
|||
|
||||
} // namespace
|
||||
|
||||
gin::WrapperInfo Session::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Session::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: isolate_(isolate),
|
||||
|
|
|
@ -57,7 +57,7 @@ struct PreloadScript;
|
|||
|
||||
namespace api {
|
||||
|
||||
class Session final : public gin::Wrappable<Session>,
|
||||
class Session final : public gin::DeprecatedWrappable<Session>,
|
||||
public gin_helper::Pinnable<Session>,
|
||||
public gin_helper::Constructible<Session>,
|
||||
public gin_helper::EventEmitterMixin<Session>,
|
||||
|
@ -92,7 +92,7 @@ class Session final : public gin::Wrappable<Session>,
|
|||
}
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
static void FillObjectTemplate(v8::Isolate*, v8::Local<v8::ObjectTemplate>);
|
||||
static const char* GetClassName() { return "Session"; }
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo SystemPreferences::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo SystemPreferences::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
SystemPreferences::SystemPreferences() {
|
||||
|
|
|
@ -38,7 +38,7 @@ enum class NotificationCenterKind {
|
|||
#endif
|
||||
|
||||
class SystemPreferences final
|
||||
: public gin::Wrappable<SystemPreferences>,
|
||||
: public gin::DeprecatedWrappable<SystemPreferences>,
|
||||
public gin_helper::EventEmitterMixin<SystemPreferences>
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
,
|
||||
|
@ -50,7 +50,7 @@ class SystemPreferences final
|
|||
static gin::Handle<SystemPreferences> Create(v8::Isolate* isolate);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -48,7 +48,7 @@ struct Converter<electron::TrayIcon::IconType> {
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
gin::WrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo Tray::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
Tray::Tray(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> image,
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace electron::api {
|
|||
|
||||
class Menu;
|
||||
|
||||
class Tray final : public gin::Wrappable<Tray>,
|
||||
class Tray final : public gin::DeprecatedWrappable<Tray>,
|
||||
public gin_helper::EventEmitterMixin<Tray>,
|
||||
public gin_helper::Constructible<Tray>,
|
||||
public gin_helper::CleanedUpAtExit,
|
||||
|
@ -55,7 +55,7 @@ class Tray final : public gin::Wrappable<Tray>,
|
|||
static const char* GetClassName() { return "Tray"; }
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
// gin_helper::CleanedUpAtExit
|
||||
|
|
|
@ -60,7 +60,7 @@ GetAllUtilityProcessWrappers() {
|
|||
|
||||
namespace api {
|
||||
|
||||
gin::WrapperInfo UtilityProcessWrapper::kWrapperInfo = {
|
||||
gin::DeprecatedWrapperInfo UtilityProcessWrapper::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
UtilityProcessWrapper::UtilityProcessWrapper(
|
||||
|
|
|
@ -40,7 +40,7 @@ class Connector;
|
|||
namespace electron::api {
|
||||
|
||||
class UtilityProcessWrapper final
|
||||
: public gin::Wrappable<UtilityProcessWrapper>,
|
||||
: public gin::DeprecatedWrappable<UtilityProcessWrapper>,
|
||||
public gin_helper::Pinnable<UtilityProcessWrapper>,
|
||||
public gin_helper::EventEmitterMixin<UtilityProcessWrapper>,
|
||||
private mojo::MessageReceiver,
|
||||
|
@ -57,7 +57,7 @@ class UtilityProcessWrapper final
|
|||
void Shutdown(uint64_t exit_code);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/current_thread.h"
|
||||
#include "base/threading/scoped_blocking_call.h"
|
||||
#include "base/unguessable_token.h"
|
||||
#include "base/values.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/devtools/devtools_eye_dropper.h"
|
||||
|
@ -147,6 +148,7 @@
|
|||
#include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.h"
|
||||
#include "third_party/blink/public/common/page/page_zoom.h"
|
||||
#include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
|
||||
#include "third_party/blink/public/common/tokens/tokens.h"
|
||||
#include "third_party/blink/public/mojom/frame/find_in_page.mojom.h"
|
||||
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
|
||||
#include "third_party/blink/public/mojom/messaging/transferable_message.mojom.h"
|
||||
|
@ -1820,16 +1822,6 @@ void WebContents::PrimaryMainFrameRenderProcessGone(
|
|||
Emit("render-process-gone", details);
|
||||
}
|
||||
|
||||
void WebContents::PluginCrashed(const base::FilePath& plugin_path,
|
||||
base::ProcessId plugin_pid) {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
content::WebPluginInfo info;
|
||||
auto* plugin_service = content::PluginService::GetInstance();
|
||||
plugin_service->GetPluginInfoByPath(plugin_path, &info);
|
||||
Emit("plugin-crashed", info.name, info.version);
|
||||
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||
}
|
||||
|
||||
void WebContents::MediaStartedPlaying(const MediaPlayerInfo& video_type,
|
||||
const content::MediaPlayerId& id) {
|
||||
Emit("media-started-playing");
|
||||
|
@ -3568,10 +3560,20 @@ void WebContents::OnCursorChanged(const ui::Cursor& cursor) {
|
|||
}
|
||||
|
||||
void WebContents::AttachToIframe(content::WebContents* embedder_web_contents,
|
||||
int embedder_frame_id) {
|
||||
std::string embedder_frame_token) {
|
||||
auto token = base::Token::FromString(embedder_frame_token);
|
||||
if (!token)
|
||||
return;
|
||||
auto unguessable_token =
|
||||
base::UnguessableToken::Deserialize(token->high(), token->low());
|
||||
if (!unguessable_token)
|
||||
return;
|
||||
auto frame_token = blink::LocalFrameToken(unguessable_token.value());
|
||||
|
||||
attached_ = true;
|
||||
if (guest_delegate_)
|
||||
guest_delegate_->AttachToIframe(embedder_web_contents, embedder_frame_id);
|
||||
if (guest_delegate_) {
|
||||
guest_delegate_->AttachToIframe(embedder_web_contents, frame_token);
|
||||
}
|
||||
}
|
||||
|
||||
bool WebContents::IsOffScreen() const {
|
||||
|
@ -4601,7 +4603,8 @@ void WebContents::SetDisableDraggableRegions(bool disable) {
|
|||
}
|
||||
|
||||
// static
|
||||
gin::WrapperInfo WebContents::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo WebContents::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "content/public/browser/render_widget_host.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "content/public/common/stop_find_action.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "gin/handle.h"
|
||||
#include "gin/wrappable.h"
|
||||
|
@ -109,7 +110,7 @@ class FrameSubscriber;
|
|||
|
||||
// Wrapper around the content::WebContents.
|
||||
class WebContents final : public ExclusiveAccessContext,
|
||||
public gin::Wrappable<WebContents>,
|
||||
public gin::DeprecatedWrappable<WebContents>,
|
||||
public gin_helper::EventEmitterMixin<WebContents>,
|
||||
public gin_helper::Constructible<WebContents>,
|
||||
public gin_helper::Pinnable<WebContents>,
|
||||
|
@ -172,7 +173,7 @@ class WebContents final : public ExclusiveAccessContext,
|
|||
static const char* GetClassName() { return "WebContents"; }
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
// gin_helper::CleanedUpAtExit
|
||||
|
@ -307,7 +308,7 @@ class WebContents final : public ExclusiveAccessContext,
|
|||
// Methods for creating <webview>.
|
||||
[[nodiscard]] bool is_guest() const { return type_ == Type::kWebView; }
|
||||
void AttachToIframe(content::WebContents* embedder_web_contents,
|
||||
int embedder_frame_id);
|
||||
std::string embedder_frame_token);
|
||||
void DetachFromOuterFrame();
|
||||
|
||||
// Methods for offscreen rendering
|
||||
|
@ -629,8 +630,6 @@ class WebContents final : public ExclusiveAccessContext,
|
|||
void DidUpdateFaviconURL(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const std::vector<blink::mojom::FaviconURLPtr>& urls) override;
|
||||
void PluginCrashed(const base::FilePath& plugin_path,
|
||||
base::ProcessId plugin_pid) override;
|
||||
void MediaStartedPlaying(const MediaPlayerInfo& video_type,
|
||||
const content::MediaPlayerId& id) override;
|
||||
void MediaStoppedPlaying(
|
||||
|
|
|
@ -144,7 +144,8 @@ content::RenderFrameHost* WebFrameMain::render_frame_host() const {
|
|||
: content::RenderFrameHost::FromFrameToken(frame_token_);
|
||||
}
|
||||
|
||||
gin::WrapperInfo WebFrameMain::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo WebFrameMain::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
WebFrameMain::WebFrameMain(content::RenderFrameHost* rfh)
|
||||
: frame_tree_node_id_(rfh->GetFrameTreeNodeId()),
|
||||
|
@ -382,6 +383,14 @@ std::string WebFrameMain::Name() const {
|
|||
return render_frame_host()->GetFrameName();
|
||||
}
|
||||
|
||||
std::string WebFrameMain::FrameToken() const {
|
||||
if (!CheckRenderFrame())
|
||||
return "";
|
||||
const blink::LocalFrameToken& frame_token =
|
||||
render_frame_host()->GetFrameToken();
|
||||
return frame_token.ToString();
|
||||
}
|
||||
|
||||
base::ProcessId WebFrameMain::OSProcessID() const {
|
||||
if (!CheckRenderFrame())
|
||||
return -1;
|
||||
|
@ -591,6 +600,7 @@ void WebFrameMain::FillObjectTemplate(v8::Isolate* isolate,
|
|||
.SetProperty("detached", &WebFrameMain::Detached)
|
||||
.SetProperty("frameTreeNodeId", &WebFrameMain::FrameTreeNodeID)
|
||||
.SetProperty("name", &WebFrameMain::Name)
|
||||
.SetProperty("frameToken", &WebFrameMain::FrameToken)
|
||||
.SetProperty("osProcessId", &WebFrameMain::OSProcessID)
|
||||
.SetProperty("processId", &WebFrameMain::ProcessID)
|
||||
.SetProperty("routingId", &WebFrameMain::RoutingID)
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace electron::api {
|
|||
class WebContents;
|
||||
|
||||
// Bindings for accessing frames from the main process.
|
||||
class WebFrameMain final : public gin::Wrappable<WebFrameMain>,
|
||||
class WebFrameMain final : public gin::DeprecatedWrappable<WebFrameMain>,
|
||||
public gin_helper::EventEmitterMixin<WebFrameMain>,
|
||||
public gin_helper::Pinnable<WebFrameMain>,
|
||||
public gin_helper::Constructible<WebFrameMain> {
|
||||
|
@ -68,7 +68,7 @@ class WebFrameMain final : public gin::Wrappable<WebFrameMain>,
|
|||
static const char* GetClassName() { return "WebFrameMain"; }
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
const char* GetTypeName() override;
|
||||
|
||||
content::RenderFrameHost* render_frame_host() const;
|
||||
|
@ -128,6 +128,7 @@ class WebFrameMain final : public gin::Wrappable<WebFrameMain>,
|
|||
bool Detached() const;
|
||||
content::FrameTreeNodeId FrameTreeNodeID() const;
|
||||
std::string Name() const;
|
||||
std::string FrameToken() const;
|
||||
base::ProcessId OSProcessID() const;
|
||||
int32_t ProcessID() const;
|
||||
int RoutingID() const;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "base/values.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "extensions/browser/api/web_request/web_request_info.h"
|
||||
#include "extensions/browser/api/web_request/web_request_resource_type.h"
|
||||
#include "extensions/common/url_pattern.h"
|
||||
|
@ -208,7 +209,7 @@ CalculateOnBeforeSendHeadersDelta(const net::HttpRequestHeaders* old_headers,
|
|||
|
||||
} // namespace
|
||||
|
||||
gin::WrapperInfo WebRequest::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo WebRequest::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
|
||||
WebRequest::RequestFilter::RequestFilter(
|
||||
std::set<URLPattern> include_url_patterns,
|
||||
|
@ -323,7 +324,7 @@ WebRequest::~WebRequest() {
|
|||
|
||||
gin::ObjectTemplateBuilder WebRequest::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<WebRequest>::GetObjectTemplateBuilder(isolate)
|
||||
return gin::DeprecatedWrappable<WebRequest>::GetObjectTemplateBuilder(isolate)
|
||||
.SetMethod(
|
||||
"onBeforeRequest",
|
||||
&WebRequest::SetResponseListener<ResponseEvent::kOnBeforeRequest>)
|
||||
|
|
|
@ -31,7 +31,7 @@ class Handle;
|
|||
|
||||
namespace electron::api {
|
||||
|
||||
class WebRequest final : public gin::Wrappable<WebRequest>,
|
||||
class WebRequest final : public gin::DeprecatedWrappable<WebRequest>,
|
||||
public WebRequestAPI {
|
||||
public:
|
||||
// Return the WebRequest object attached to |browser_context|, create if there
|
||||
|
@ -54,7 +54,7 @@ class WebRequest final : public gin::Wrappable<WebRequest>,
|
|||
static const char* GetClassName() { return "WebRequest"; }
|
||||
|
||||
// gin::Wrappable:
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
gin::WrapperInfo MessagePort::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||
gin::DeprecatedWrapperInfo MessagePort::kWrapperInfo = {
|
||||
gin::kEmbedderNativeGin};
|
||||
|
||||
MessagePort::MessagePort() = default;
|
||||
MessagePort::~MessagePort() {
|
||||
|
@ -278,7 +279,8 @@ bool MessagePort::Accept(mojo::Message* mojo_message) {
|
|||
|
||||
gin::ObjectTemplateBuilder MessagePort::GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) {
|
||||
return gin::Wrappable<MessagePort>::GetObjectTemplateBuilder(isolate)
|
||||
return gin::DeprecatedWrappable<MessagePort>::GetObjectTemplateBuilder(
|
||||
isolate)
|
||||
.SetMethod("postMessage", &MessagePort::PostMessage)
|
||||
.SetMethod("start", &MessagePort::Start)
|
||||
.SetMethod("close", &MessagePort::Close);
|
||||
|
|
|
@ -27,7 +27,7 @@ class Connector;
|
|||
namespace electron {
|
||||
|
||||
// A non-blink version of blink::MessagePort.
|
||||
class MessagePort final : public gin::Wrappable<MessagePort>,
|
||||
class MessagePort final : public gin::DeprecatedWrappable<MessagePort>,
|
||||
public gin_helper::CleanedUpAtExit,
|
||||
private mojo::MessageReceiver {
|
||||
public:
|
||||
|
@ -56,7 +56,7 @@ class MessagePort final : public gin::Wrappable<MessagePort>,
|
|||
bool* threw_exception);
|
||||
|
||||
// gin::Wrappable
|
||||
static gin::WrapperInfo kWrapperInfo;
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||
v8::Isolate* isolate) override;
|
||||
const char* GetTypeName() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue