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

Unified Diff: ppapi/proxy/ppp_instance_proxy.cc

Issue 6400007: Implement proxy for 3d-related interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 11 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 | « ppapi/proxy/ppb_surface_3d_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_instance_proxy.cc
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index b2103a3a4eea38a4699e9c8a0da020ea6dcea221..144e3a18b044eecc647a785d1ed941a6111ceb38 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_proxy.cc
@@ -9,6 +9,7 @@
#include "ppapi/c/pp_var.h"
#include "ppapi/c/ppp_instance.h"
#include "ppapi/proxy/host_dispatcher.h"
+#include "ppapi/proxy/plugin_dispatcher.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/ppb_url_loader_proxy.h"
@@ -142,6 +143,11 @@ void PPP_Instance_Proxy::OnMsgDidCreate(
if (argn.size() != argv.size())
return;
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return;
+ dispatcher->DidCreateInstance(instance);
+
// Make sure the arrays always have at least one element so we can take the
// address below.
std::vector<const char*> argn_array(
@@ -162,11 +168,23 @@ void PPP_Instance_Proxy::OnMsgDidCreate(
void PPP_Instance_Proxy::OnMsgDidDestroy(PP_Instance instance) {
ppp_instance_target()->DidDestroy(instance);
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return;
+
+ dispatcher->DidDestroyInstance(instance);
}
void PPP_Instance_Proxy::OnMsgDidChangeView(PP_Instance instance,
const PP_Rect& position,
const PP_Rect& clip) {
+ PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
+ if (!dispatcher)
+ return;
+ InstanceData* data = dispatcher->GetInstanceData(instance);
+ if (!data)
+ return;
+ data->position = position;
ppp_instance_target()->DidChangeView(instance, &position, &clip);
}
« no previous file with comments | « ppapi/proxy/ppb_surface_3d_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698