2020-01-15 23:11:51 +00:00
|
|
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_
|
|
|
|
#define ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_
|
2020-01-15 23:11:51 +00:00
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "extensions/renderer/dispatcher_delegate.h"
|
|
|
|
|
|
|
|
class ElectronExtensionsDispatcherDelegate
|
|
|
|
: public extensions::DispatcherDelegate {
|
|
|
|
public:
|
|
|
|
ElectronExtensionsDispatcherDelegate();
|
|
|
|
~ElectronExtensionsDispatcherDelegate() override;
|
|
|
|
|
2021-11-03 11:41:45 +00:00
|
|
|
// disable copy
|
|
|
|
ElectronExtensionsDispatcherDelegate(
|
|
|
|
const ElectronExtensionsDispatcherDelegate&) = delete;
|
|
|
|
ElectronExtensionsDispatcherDelegate& operator=(
|
|
|
|
const ElectronExtensionsDispatcherDelegate&) = delete;
|
|
|
|
|
2020-01-15 23:11:51 +00:00
|
|
|
private:
|
|
|
|
// extensions::DispatcherDelegate implementation.
|
|
|
|
void RegisterNativeHandlers(
|
|
|
|
extensions::Dispatcher* dispatcher,
|
|
|
|
extensions::ModuleSystem* module_system,
|
|
|
|
extensions::NativeExtensionBindingsSystem* bindings_system,
|
|
|
|
extensions::ScriptContext* context) override;
|
|
|
|
void PopulateSourceMap(
|
|
|
|
extensions::ResourceBundleSourceMap* source_map) override;
|
|
|
|
void RequireWebViewModules(extensions::ScriptContext* context) override;
|
|
|
|
void OnActiveExtensionsUpdated(
|
2020-10-27 15:18:36 +00:00
|
|
|
const std::set<std::string>& extension_ids) override;
|
2020-01-15 23:11:51 +00:00
|
|
|
void InitializeBindingsSystem(
|
|
|
|
extensions::Dispatcher* dispatcher,
|
|
|
|
extensions::NativeExtensionBindingsSystem* bindings_system) override;
|
|
|
|
};
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_
|