Index: content/public/renderer/renderer_ppapi_host.h |
diff --git a/content/public/renderer/renderer_ppapi_host.h b/content/public/renderer/renderer_ppapi_host.h |
index 4d81c50b7e80168bed5f16e0ca86e8517abeeda0..fa66ce633ee2e391fa3467d1f296731370ac2f60 100644 |
--- a/content/public/renderer/renderer_ppapi_host.h |
+++ b/content/public/renderer/renderer_ppapi_host.h |
@@ -23,6 +23,7 @@ class Point; |
namespace IPC { |
struct ChannelHandle; |
+class Message; |
} |
namespace ppapi { |
@@ -136,6 +137,18 @@ class RendererPpapiHost { |
// Returns true if the plugin is running in process. |
virtual bool IsRunningInProcess() const = 0; |
+ // There are times when the renderer needs to create a ResourceHost in the |
+ // browser. This function does so asynchronously. |nested_msg| is the |
+ // resource host creation message and |instance| is the PP_Instance which |
+ // the resource will belong to. |callback| will be called with the pending |
+ // host ID when the ResourceHost has been created. This can be passed back |
+ // to the plugin to attach to the ResourceHost. A pending ID of 0 will be |
+ // passed to the callback upon error. |
+ virtual void CreateBrowserResourceHost( |
+ PP_Instance instance, |
+ const IPC::Message& nested_msg, |
+ const base::Callback<void(int)>& callback) const = 0; |
+ |
protected: |
virtual ~RendererPpapiHost() {} |
}; |