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

Unified Diff: content/renderer/pepper/host_resource_var.h

Issue 24196005: [PPAPI] ResourceVar now holds a pending renderer and browser host ID. (Closed) Base URL: http://git.chromium.org/chromium/src.git@pepper-resourcerawvardata
Patch Set: Created 7 years, 3 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 | « no previous file | content/renderer/pepper/host_resource_var.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/host_resource_var.h
diff --git a/content/renderer/pepper/host_resource_var.h b/content/renderer/pepper/host_resource_var.h
index 79fe487041debc41db8e2d539d9c211ad78e5ed5..a2b186bb9160e08e3d54d678218addc544e89124 100644
--- a/content/renderer/pepper/host_resource_var.h
+++ b/content/renderer/pepper/host_resource_var.h
@@ -24,23 +24,38 @@ class HostResourceVar : public ppapi::ResourceVar {
explicit HostResourceVar(PP_Resource pp_resource);
// Makes a resource var with a pending resource host.
- // The |creation_message| contains data needed to create the plugin-side
- // resource. Its type depends on the type of resource.
- explicit HostResourceVar(const IPC::Message& creation_message);
+ // The |pending_renderer_host_id| is a pending resource host ID in the
+ // renderer to attach from the plugin. Depending on the type of resource, this
+ // may be 0. The |creation_message| contains additional data needed to create
+ // the plugin-side resource. Its type depends on the type of resource.
+ HostResourceVar(int pending_renderer_host_id,
+ const IPC::Message& creation_message);
// ResourceVar override.
virtual PP_Resource GetPPResource() const OVERRIDE;
+ virtual int GetPendingRendererHostId() const OVERRIDE;
+ virtual int GetPendingBrowserHostId() const OVERRIDE;
virtual const IPC::Message* GetCreationMessage() const OVERRIDE;
virtual bool IsPending() const OVERRIDE;
+ void SetPendingBrowserHostId(int id) {
yzshen1 2013/09/24 17:03:30 nit: please use set_pending_browser_host_id(). (G
Matt Giuca 2013/09/25 00:59:38 Done.
+ pending_browser_host_id_ = id;
+ }
+
protected:
virtual ~HostResourceVar();
private:
// Real resource ID in the plugin. 0 if one has not yet been created
- // (indicating that there is a pending host resource).
+ // (indicating that there is a pending resource host).
PP_Resource pp_resource_;
+ // Pending resource host ID in the renderer.
+ int pending_renderer_host_id_;
+
+ // Pending resource host ID in the browser.
+ int pending_browser_host_id_;
+
// If the plugin-side resource has not yet been created, carries a message to
// create a resource of the specific type on the plugin side. Otherwise, NULL.
scoped_ptr<IPC::Message> creation_message_;
« no previous file with comments | « no previous file | content/renderer/pepper/host_resource_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698