electron/shell/renderer/extensions/electron_extensions_renderer_api_provider.cc
electron-roller[bot] 150c2bcef9
chore: bump chromium to 124.0.6351.0 (main) (#41514)
* chore: bump chromium in DEPS to 124.0.6339.0

* chore: update patches

* chore: bump chromium in DEPS to 124.0.6341.0

* chore: update patches

* chore: bump chromium in DEPS to 124.0.6343.0

* chore: bump chromium in DEPS to 124.0.6345.0

* chore: update patches

* build: temporarily patch out usage of reclient inputs cfg

* chore: implement missing OnPortConnectedStateChanged

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5039155

* fix: move NativeHandlers in extensions to new RendererAPIProvider

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5332839
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5334058

* chore: add missing websocket method

* refactor: use std::erase instead of base::Erase

Ref: https://issues.chromium.org/issues/40256229

* build: fix reclient inputs processor bug (workaround)

* fix: delay extensions::Dispatcher construction

* chore: bump chromium in DEPS to 124.0.6347.0

* chore: bump chromium in DEPS to 124.0.6349.0

* 5326217: [ViewsAX] Remove WebAXPlatformTreeManagerDelegate

https://chromium-review.googlesource.com/c/chromium/src/+/5326217

* 5347916: Get origin from parent for process-isolated srcdoc.

https://chromium-review.googlesource.com/c/chromium/src/+/5347916

* chore: patches fixup

* 4866222: [api] Deprecate vector<v8::Local>, part 1

https://chromium-review.googlesource.com/c/v8/v8/+/4866222

* 5337304: Remove DXDiag telemetry code.

https://chromium-review.googlesource.com/c/chromium/src/+/5337304

* 5328275: Implement watermark routing to the BrowserView

https://chromium-review.googlesource.com/c/chromium/src/+/5328275

* [libc++] Rename __fwd/hash.h to __fwd/functional.h and add reference_wrapper

* chore: bump chromium in DEPS to 124.0.6351.0

* chore: update patches

* 5342763: [object] Fast path for adding props with existing transition

https://chromium-review.googlesource.com/c/v8/v8/+/5342763

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2024-03-12 10:15:41 +01:00

49 lines
2.1 KiB
C++

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "shell/renderer/extensions/electron_extensions_renderer_api_provider.h"
#include "chrome/renderer/extensions/api/extension_hooks_delegate.h"
#include "chrome/renderer/extensions/api/tabs_hooks_delegate.h"
#include "extensions/renderer/bindings/api_bindings_system.h"
#include "extensions/renderer/dispatcher.h"
#include "extensions/renderer/lazy_background_page_native_handler.h"
#include "extensions/renderer/module_system.h"
#include "extensions/renderer/native_extension_bindings_system.h"
#include "extensions/renderer/native_handler.h"
#include "extensions/renderer/resource_bundle_source_map.h"
#include "extensions/renderer/script_context.h"
namespace electron {
void ElectronExtensionsRendererAPIProvider::RegisterNativeHandlers(
extensions::ModuleSystem* module_system,
extensions::NativeExtensionBindingsSystem* bindings_system,
extensions::ScriptContext* context) {
module_system->RegisterNativeHandler(
"lazy_background_page",
std::make_unique<extensions::LazyBackgroundPageNativeHandler>(context));
}
void ElectronExtensionsRendererAPIProvider::AddBindingsSystemHooks(
extensions::Dispatcher* dispatcher,
extensions::NativeExtensionBindingsSystem* bindings_system) {
extensions::APIBindingsSystem* bindings = bindings_system->api_system();
bindings->RegisterHooksDelegate(
"extension", std::make_unique<extensions::ExtensionHooksDelegate>(
bindings_system->messaging_service()));
bindings->RegisterHooksDelegate(
"tabs", std::make_unique<extensions::TabsHooksDelegate>(
bindings_system->messaging_service()));
}
void ElectronExtensionsRendererAPIProvider::PopulateSourceMap(
extensions::ResourceBundleSourceMap* source_map) {}
void ElectronExtensionsRendererAPIProvider::EnableCustomElementAllowlist() {}
void ElectronExtensionsRendererAPIProvider::RequireWebViewModules(
extensions::ScriptContext* context) {}
} // namespace electron