// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_ #define EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_ #include <map> #include <set> #include <string> #include <vector> #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "extensions/browser/extension_function.h" #include "extensions/common/features/feature.h" #include "extensions/common/mojom/context_type.mojom-forward.h" #include "extensions/common/mojom/frame.mojom.h" #include "extensions/common/mojom/service_worker_host.mojom.h" #include "ipc/ipc_sender.h" namespace content { class BrowserContext; class RenderFrameHost; class RenderProcessHost; class WebContents; } namespace extensions { class Extension; class ExtensionAPI; class WindowController; // ExtensionFunctionDispatcher receives requests to execute functions from // Chrome extensions running in a RenderFrameHost and dispatches them to the // appropriate handler. It lives entirely on the UI thread. // // ExtensionFunctionDispatcher should be a member of some class that hosts // RenderFrameHosts and wants them to be able to display extension content. // This class should also implement ExtensionFunctionDispatcher::Delegate. // // Note that a single ExtensionFunctionDispatcher does *not* correspond to a // single RVH, a single extension, or a single URL. This is by design so that // we can gracefully handle cases like WebContents, where the RVH, extension, // and URL can all change over the lifetime of the tab. Instead, these items // are all passed into each request. class ExtensionFunctionDispatcher { … }; } // namespace extensions #endif // EXTENSIONS_BROWSER_EXTENSION_FUNCTION_DISPATCHER_H_