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

Unified Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 6905088: New thunk system for Pepper proxy and implementation (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
Index: ppapi/proxy/plugin_dispatcher.cc
===================================================================
--- ppapi/proxy/plugin_dispatcher.cc (revision 84344)
+++ ppapi/proxy/plugin_dispatcher.cc (working copy)
@@ -14,9 +14,12 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/interface_proxy.h"
#include "ppapi/proxy/plugin_message_filter.h"
+#include "ppapi/proxy/plugin_resource_tracker.h"
#include "ppapi/proxy/plugin_var_serialization_rules.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/ppp_class_proxy.h"
+#include "ppapi/proxy/resource_creation_proxy.h"
+#include "ppapi/shared_impl/tracker_base.h"
#if defined(OS_POSIX)
#include "base/eintr_wrapper.h"
@@ -41,6 +44,9 @@
// As a plugin, we always support the PPP_Class interface. There's no
// GetInterface call or name for it, so we insert it into our table now.
target_proxies_[INTERFACE_ID_PPP_CLASS].reset(new PPP_Class_Proxy(this));
+
+ ::ppapi::shared_impl::TrackerBase::Init(
+ &PluginResourceTracker::GetTrackerBaseInstance);
}
PluginDispatcher::~PluginDispatcher() {
@@ -195,6 +201,17 @@
return (it == instance_map_.end()) ? NULL : &it->second;
}
+::ppapi::shared_impl::FunctionGroupBase* PluginDispatcher::GetFunctionAPI(
+ pp::proxy::InterfaceID id) {
+ if (function_proxies_[id].get())
+ return function_proxies_[id].get();
+
+ if (id == INTERFACE_ID_RESOURCE_CREATION)
+ function_proxies_[id].reset(new ResourceCreationProxy(this));
+
+ return function_proxies_[id].get();
+}
+
void PluginDispatcher::ForceFreeAllInstances() {
if (!g_instance_to_dispatcher)
return;

Powered by Google App Engine
This is Rietveld 408576698