Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Unified Diff: content/public/renderer/renderer_ppapi_host.h

Issue 15947004: Allow renderer to create pepper ResourceHosts in the browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {}
};

Powered by Google App Engine
This is Rietveld 408576698