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

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, 6 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
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/pepper/mock_renderer_ppapi_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {}
};
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/pepper/mock_renderer_ppapi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698