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..b891309ff280d143a7e398d3c2f468b6c849ca8e 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 |
+ // returned upon error. |
teravest
2013/05/29 15:19:36
small nit: Should this be "sent to the callback" i
raymes
2013/05/29 15:53:03
Done.
|
+ virtual void CreateBrowserResourceHost( |
+ PP_Instance instance, |
+ const IPC::Message& nested_msg, |
+ base::Callback<void(int)> callback) const = 0; |
+ |
protected: |
virtual ~RendererPpapiHost() {} |
}; |