// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_BROWSER_INTERFACE_BROKER_IMPL_H_ #define CONTENT_BROWSER_BROWSER_INTERFACE_BROKER_IMPL_H_ #include "base/memory/raw_ptr.h" #include "content/browser/browser_interface_binders.h" #include "content/browser/mojo_binder_policy_applier.h" #include "mojo/public/cpp/bindings/binder_map.h" #include "mojo/public/cpp/bindings/generic_pending_receiver.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/mojom/browser_interface_broker.mojom.h" namespace content { // content's implementation of the BrowserInterfaceBroker interface that binds // interfaces requested by the renderer. Every execution context type (frame, // worker etc) owns an instance and registers appropriate handlers, called // "binders" (see internal::PopulateBinderMap and // internal::PopulateBinderMapWithContext). // // By default, BrowserInterfaceBrokerImpl runs the binder that was registered // for a given interface when the interface is requested. However, in some cases // such as prerendering pages, it may be desirable to defer running the binder, // or take another action. Setting a non-null `MojoBinderPolicyApplier` enables // this behavior. // // Note: BrowserInterfaceBrokerImpl will eventually replace the usage of // InterfaceProvider and browser manifests, as well as DocumentInterfaceBroker. template <typename ExecutionContextHost, typename InterfaceBinderContext> class BrowserInterfaceBrokerImpl : public blink::mojom::BrowserInterfaceBroker { … }; } // namespace content #endif // CONTENT_BROWSER_BROWSER_INTERFACE_BROKER_IMPL_H_