Index: ppapi/proxy/plugin_dispatcher.h |
diff --git a/ppapi/proxy/plugin_dispatcher.h b/ppapi/proxy/plugin_dispatcher.h |
index ae6da6045e0e04daf303ecad183f61b6e3491f09..b2fbeec549dcab28665844c5befd351b1d64ddef 100644 |
--- a/ppapi/proxy/plugin_dispatcher.h |
+++ b/ppapi/proxy/plugin_dispatcher.h |
@@ -26,6 +26,7 @@ class WaitableEvent; |
namespace ppapi { |
struct Preferences; |
+class Resource; |
} |
namespace pp { |
@@ -84,6 +85,10 @@ class PluginDispatcher : public Dispatcher { |
// DidCreateInstance/DidDestroyInstance. |
static PluginDispatcher* GetForInstance(PP_Instance instance); |
+ // Same as GetForInstance but retrieves the instance from the given resource |
+ // object as a convenience. Returns NULL on failure. |
+ static PluginDispatcher* GetForResource(const ppapi::Resource* resource); |
+ |
static const void* GetInterfaceFromDispatcher(const char* interface); |
// You must call this function before anything else. Returns true on success. |