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

Unified Diff: ppapi/proxy/plugin_dispatcher.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
index 53dab265f5b6750f38eb402c4979be112cb64c95..fea4de6fcb93c9226e7dc62b913755e4d5985b1e 100644
--- a/ppapi/proxy/plugin_dispatcher.cc
+++ b/ppapi/proxy/plugin_dispatcher.cc
@@ -24,6 +24,7 @@
#include "ppapi/proxy/ppb_instance_proxy.h"
#include "ppapi/proxy/ppp_class_proxy.h"
#include "ppapi/proxy/resource_creation_proxy.h"
+#include "ppapi/shared_impl/resource.h"
#include "ppapi/shared_impl/tracker_base.h"
#if defined(OS_POSIX)
@@ -31,6 +32,8 @@
#include "ipc/ipc_channel_posix.h"
#endif
+using ppapi::Resource;
+
namespace pp {
namespace proxy {
@@ -74,6 +77,11 @@ PluginDispatcher* PluginDispatcher::GetForInstance(PP_Instance instance) {
}
// static
+PluginDispatcher* PluginDispatcher::GetForResource(const Resource* resource) {
+ return GetForInstance(resource->pp_instance());
+}
+
+// static
const void* PluginDispatcher::GetInterfaceFromDispatcher(
const char* interface) {
// All interfaces the plugin requests of the browser are "PPB".

Powered by Google App Engine
This is Rietveld 408576698