| Index: content/renderer/browser_plugin/browser_plugin_bindings.h
|
| diff --git a/content/renderer/browser_plugin/browser_plugin_bindings.h b/content/renderer/browser_plugin/browser_plugin_bindings.h
|
| index 2d9fa2d90aff5bf389b28fd8064b04f550321ac6..a84580f1498a8daaf4bf7be3a9aa065367e73bcf 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin_bindings.h
|
| +++ b/content/renderer/browser_plugin/browser_plugin_bindings.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__
|
| #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_BINDINGS_H__
|
|
|
| +#include "base/memory/scoped_vector.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "ppapi/shared_impl/resource.h"
|
| #include "third_party/npapi/bindings/npruntime.h"
|
| @@ -15,6 +16,10 @@ class WebSerializedScriptValue;
|
|
|
| namespace content {
|
|
|
| +namespace internal {
|
| +class BrowserPluginMethodBinding;
|
| +}
|
| +
|
| class BrowserPlugin;
|
|
|
| class BrowserPluginBindings {
|
| @@ -36,11 +41,21 @@ class BrowserPluginBindings {
|
| NPObject* np_object() const { return np_object_; }
|
|
|
| BrowserPlugin* instance() const { return instance_; }
|
| +
|
| + bool HasMethod(NPIdentifier name) const;
|
| +
|
| + bool InvokeMethod(NPIdentifier name,
|
| + const NPVariant* args,
|
| + uint32 arg_count,
|
| + NPVariant* result);
|
| private:
|
| BrowserPlugin* instance_;
|
| // The NPObject we use to expose postMessage to JavaScript.
|
| BrowserPluginNPObject* np_object_;
|
|
|
| + typedef ScopedVector<internal::BrowserPluginMethodBinding> BindingList;
|
| + BindingList method_bindings_;
|
| +
|
| // This is used to ensure pending tasks will not fire after this object is
|
| // destroyed.
|
| base::WeakPtrFactory<BrowserPluginBindings> weak_ptr_factory_;
|
|
|