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

Unified Diff: ppapi/proxy/plugin_resource.cc

Issue 11414147: Add ability to create pending resource hosts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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: ppapi/proxy/plugin_resource.cc
diff --git a/ppapi/proxy/plugin_resource.cc b/ppapi/proxy/plugin_resource.cc
index 3a023091496f0e4da669d32e6d8c9e12ea002087..fca06308cdd548a7fd7d5718f3ebe7e1a7bed7e2 100644
--- a/ppapi/proxy/plugin_resource.cc
+++ b/ppapi/proxy/plugin_resource.cc
@@ -81,6 +81,20 @@ void PluginResource::SendCreate(Destination dest, const IPC::Message& msg) {
new PpapiHostMsg_ResourceCreated(params, pp_instance(), msg));
}
+void PluginResource::AttachToPendingHost(Destination dest,
+ int pending_host_id) {
+ // Connecting to a pending host is a replacement for "create".
+ if (dest == RENDERER) {
+ DCHECK(!sent_create_to_renderer_);
+ sent_create_to_renderer_ = true;
+ } else {
+ DCHECK(!sent_create_to_browser_);
+ sent_create_to_browser_ = true;
+ }
+ GetSender(dest)->Send(
+ new PpapiHostMsg_AttachToPendingHost(pp_resource(), pending_host_id));
+}
+
void PluginResource::Post(Destination dest, const IPC::Message& msg) {
ResourceMessageCallParams params(pp_resource(), GetNextSequence());
SendResourceCall(dest, params, msg);

Powered by Google App Engine
This is Rietveld 408576698