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); |