Move associated interface helper impls to Blink
blink::AssocaitedInterfaceRegistry and blink::AssociatedInterfaceProvider
are defined in blink/public/common but have only been implemented within
content/common. This is inconvenient if e.g. Chrome sources want to
instantiate one of those types, which is in fact a useful thing for Chrome
to be able to do.
This moves the implementation of the types into Blink so that they are
concrete types rather than virual interfaces.
The immediate motivation here is a need to convert Chrome's Autofill
implementation to use associated interfaces.
Bug: 866616
Change-Id: I9db0906ad0b09fa917f30b838163297703e6f3cd
Reviewed-on: https://chromium-review.googlesource.com/1147923
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Commit-Queue: Ken Rockot <[email protected]>
Cr-Commit-Position: refs/heads/master@{#579409}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 44ae01c63..c3574fec 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -29,7 +29,6 @@
#include "base/single_thread_task_runner.h"
#include "base/unguessable_token.h"
#include "build/build_config.h"
-#include "content/common/associated_interface_registry_impl.h"
#include "content/common/buildflags.h"
#include "content/common/download/mhtml_save_status.h"
#include "content/common/frame.mojom.h"
@@ -71,6 +70,8 @@
#include "services/service_manager/public/cpp/interface_provider.h"
#include "services/service_manager/public/mojom/connector.mojom.h"
#include "services/service_manager/public/mojom/interface_provider.mojom.h"
+#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
+#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/feature_policy/feature_policy.h"
#include "third_party/blink/public/mojom/manifest/manifest_manager.mojom.h"
#include "third_party/blink/public/mojom/page/page_visibility_state.mojom.h"
@@ -150,7 +151,6 @@
namespace content {
-class AssociatedInterfaceProviderImpl;
class BlinkInterfaceRegistryImpl;
class CompositorDependencies;
class ExternalPopupMenu;
@@ -1564,8 +1564,8 @@
// Creates various media clients.
MediaFactory media_factory_;
- AssociatedInterfaceRegistryImpl associated_interfaces_;
- std::unique_ptr<AssociatedInterfaceProviderImpl>
+ blink::AssociatedInterfaceRegistry associated_interfaces_;
+ std::unique_ptr<blink::AssociatedInterfaceProvider>
remote_associated_interfaces_;
// TODO(dcheng): Remove these members.