Index: content/public/browser/render_process_host.h |
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h |
index de2843d4f796f29416cb0b0fa51a550588773de1..8d3d8db7a2324440235b5da9fb63c416c5da7ffe 100644 |
--- a/content/public/browser/render_process_host.h |
+++ b/content/public/browser/render_process_host.h |
@@ -16,6 +16,7 @@ |
#include "base/process/process_handle.h" |
#include "base/supports_user_data.h" |
#include "content/common/content_export.h" |
+#include "content/public/common/routed_interface.mojom.h" |
#include "ipc/ipc_channel_proxy.h" |
#include "ipc/ipc_sender.h" |
#include "ui/gfx/native_widget_types.h" |
@@ -32,6 +33,10 @@ class AudioOutputController; |
class MediaKeys; |
} |
+namespace mojo { |
+class AssociatedGroup; |
+} |
+ |
namespace shell { |
class Connection; |
class InterfaceProvider; |
@@ -85,6 +90,14 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
virtual void AddRoute(int32_t routing_id, IPC::Listener* listener) = 0; |
virtual void RemoveRoute(int32_t routing_id) = 0; |
+ // Adds a mojom::RoutedInterfaceProvider for a specific message routing ID. |
+ // |provider| must live at least until RemoveRoute() is called on |
+ // |routing_id|. |
+ virtual void AddRoutedInterfaces( |
+ int32_t routing_id, |
+ mojom::RoutedInterfaceProvider* provider) = 0; |
+ virtual mojo::AssociatedGroup* GetRoutedInterfaceGroup() = 0; |
+ |
// Add and remove observers for lifecycle events. The order in which |
// notifications are sent to observers is undefined. Observers must be sure to |
// remove the observer before they go away. |
@@ -266,6 +279,10 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender, |
// interfaces exposed to it from the renderer. |
virtual shell::InterfaceProvider* GetRemoteInterfaces() = 0; |
+ // Returns the mojom::RouteProvider the browser process can use to connect |
+ // to routed interfaces in the renderer. |
+ virtual mojom::RouteProvider* GetRemoteRouteProvider() = 0; |
+ |
// Extracts any persistent-memory-allocator used for renderer metrics. |
// Ownership is passed to the caller. To support sharing of histogram data |
// between the Renderer and the Browser, the allocator is created when the |