Index: content/child/child_thread_impl.h |
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h |
index a66506aac5d5b40543b4381b7c933372cd31c29f..26ef9d847b7cc227838395c59493798755bb9e5d 100644 |
--- a/content/child/child_thread_impl.h |
+++ b/content/child/child_thread_impl.h |
@@ -20,10 +20,13 @@ |
#include "build/build_config.h" |
#include "content/common/content_export.h" |
#include "content/public/child/child_thread.h" |
+#include "content/public/common/associated_interfaces.mojom.h" |
#include "ipc/ipc.mojom.h" |
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
#include "ipc/ipc_platform_file.h" |
#include "ipc/message_router.h" |
+#include "mojo/public/cpp/bindings/associated_binding.h" |
+#include "mojo/public/cpp/bindings/associated_binding_set.h" |
namespace base { |
class MessageLoop; |
@@ -70,7 +73,9 @@ struct RequestInfo; |
// The main thread of a child process derives from this class. |
class CONTENT_EXPORT ChildThreadImpl |
: public IPC::Listener, |
- virtual public ChildThread { |
+ virtual public ChildThread, |
+ NON_EXPORTED_BASE(public mojom::RouteProvider), |
+ NON_EXPORTED_BASE(public mojom::AssociatedInterfaceProvider) { |
public: |
struct CONTENT_EXPORT Options; |
@@ -101,6 +106,7 @@ class CONTENT_EXPORT ChildThreadImpl |
MojoShellConnection* GetMojoShellConnection() override; |
shell::InterfaceRegistry* GetInterfaceRegistry() override; |
shell::InterfaceProvider* GetRemoteInterfaces() override; |
+ mojom::RouteProvider* GetRemoteRouteProvider() override; |
IPC::SyncChannel* channel() { return channel_.get(); } |
@@ -246,12 +252,29 @@ class CONTENT_EXPORT ChildThreadImpl |
void EnsureConnected(); |
+ void OnRouteProviderRequest(mojom::RouteProviderAssociatedRequest request); |
+ |
+ // mojom::RouteProvider: |
+ void GetRoute( |
+ int32_t routing_id, |
+ mojom::AssociatedInterfaceProviderAssociatedRequest request) override; |
+ |
+ // mojom::AssociatedInterfaceProvider: |
+ void GetAssociatedInterface( |
+ const std::string& name, |
+ mojom::AssociatedInterfaceAssociatedRequest request) override; |
+ |
std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; |
std::unique_ptr<shell::InterfaceRegistry> interface_registry_; |
std::unique_ptr<shell::InterfaceProvider> remote_interfaces_; |
std::unique_ptr<MojoShellConnection> mojo_shell_connection_; |
std::unique_ptr<shell::Connection> browser_connection_; |
+ mojo::AssociatedBinding<mojom::RouteProvider> route_provider_binding_; |
+ mojo::AssociatedBindingSet<mojom::AssociatedInterfaceProvider> |
+ associated_interface_provider_bindings_; |
+ mojom::RouteProviderAssociatedPtr remote_route_provider_; |
+ |
std::string channel_name_; |
std::unique_ptr<IPC::SyncChannel> channel_; |