electron/shell/renderer/extensions/electron_extensions_renderer_api_provider.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
2.1 KiB
C++
Raw Normal View History

chore: bump chromium to 124.0.6355.1 (30-x-y) (#41490) * chore: bump chromium to 124.0.6351.0 * 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> * chore: bump chromium to 124.0.6353.0 * chore: bump chromium in DEPS to 124.0.6353.0 * chore: update patches * 5365462: Add missing perfetto::Flow and TRACE_EVENT includes https://chromium-review.googlesource.com/c/chromium/src/+/5365462 * 5356336: Ensure destruction of mojo channel when destructing KeySystemsImpl https://chromium-review.googlesource.com/c/chromium/src/+/5356336 * 5332839: [Extensions] Register NativeHandlers with the RendererAPIProvider https://chromium-review.googlesource.com/c/chromium/src/+/5332839 * 5148827: Add permission types for keyboard lock and pointer lock [1/N] https://chromium-review.googlesource.com/c/chromium/src/+/5148827 * 5358818: Revert "[object] Fast path for adding props with existing transition" https://chromium-review.googlesource.com/c/v8/v8/+/5358818 --------- 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: Shelley Vohr <shelley.vohr@gmail.com> --------- 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-14 14:42:18 +00:00
// 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,
chore: bump chromium to 124.0.6359.0 (30-x-y) (#41606) * chore: bump chromium in DEPS to 124.0.6355.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * 5341411: view-transition: Ensure resources are cleaned up in all cases. https://chromium-review.googlesource.com/c/chromium/src/+/5341411 Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: fixup patch indices Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * 5354013: Return nullopt on error from ProcessMetrics CPU measurements https://chromium-review.googlesource.com/c/chromium/src/+/5354013 Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: bump chromium in DEPS to 124.0.6357.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * 5368769: Reland "[mojo] Use large worker for mojom_parser action" https://chromium-review.googlesource.com/c/chromium/src/+/5368769 Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * 5336171: [Extensions] Introduce a CoreExtensionsRendererAPIProvider https://chromium-review.googlesource.com/c/chromium/src/+/5336171 Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * 5367334: [FS Shortcut] Refactor ExclusiveAccessManager https://chromium-review.googlesource.com/c/chromium/src/+/5367334 Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * 5354161: Rename GeolocationManager to GeolocationSystemPermissionManager https://chromium-review.googlesource.com/c/chromium/src/+/5354161 Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * fixup: [Extensions] Introduce a CoreExtensionsRendererAPIProvider Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * chore: bump chromium in DEPS to 124.0.6359.0 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> * 5371370: [Extensions] Move core NativeHandler registration https://chromium-review.googlesource.com/c/chromium/src/+/5371370 Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> * 5370702: [Extensions] Introduce ShellExtensionsRendererAPIProvider https://chromium-review.googlesource.com/c/chromium/src/+/5370702 Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2024-03-15 22:13:55 +00:00
extensions::V8SchemaRegistry* v8_schema_registry,
chore: bump chromium to 124.0.6355.1 (30-x-y) (#41490) * chore: bump chromium to 124.0.6351.0 * 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> * chore: bump chromium to 124.0.6353.0 * chore: bump chromium in DEPS to 124.0.6353.0 * chore: update patches * 5365462: Add missing perfetto::Flow and TRACE_EVENT includes https://chromium-review.googlesource.com/c/chromium/src/+/5365462 * 5356336: Ensure destruction of mojo channel when destructing KeySystemsImpl https://chromium-review.googlesource.com/c/chromium/src/+/5356336 * 5332839: [Extensions] Register NativeHandlers with the RendererAPIProvider https://chromium-review.googlesource.com/c/chromium/src/+/5332839 * 5148827: Add permission types for keyboard lock and pointer lock [1/N] https://chromium-review.googlesource.com/c/chromium/src/+/5148827 * 5358818: Revert "[object] Fast path for adding props with existing transition" https://chromium-review.googlesource.com/c/v8/v8/+/5358818 --------- 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: Shelley Vohr <shelley.vohr@gmail.com> --------- 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-14 14:42:18 +00:00
extensions::ScriptContext* context) const {
module_system->RegisterNativeHandler(
"lazy_background_page",
std::make_unique<extensions::LazyBackgroundPageNativeHandler>(context));
}
void ElectronExtensionsRendererAPIProvider::AddBindingsSystemHooks(
extensions::Dispatcher* dispatcher,
extensions::NativeExtensionBindingsSystem* bindings_system) const {
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) const {}
void ElectronExtensionsRendererAPIProvider::EnableCustomElementAllowlist()
const {}
void ElectronExtensionsRendererAPIProvider::RequireWebViewModules(
extensions::ScriptContext* context) const {}
} // namespace electron