Index: content/public/renderer/browser_plugin/browser_plugin_method_binding.h |
diff --git a/content/public/renderer/browser_plugin/browser_plugin_method_binding.h b/content/public/renderer/browser_plugin/browser_plugin_method_binding.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3eb8dc1e2d84ece000d38fb90bef2edf8161de48 |
--- /dev/null |
+++ b/content/public/renderer/browser_plugin/browser_plugin_method_binding.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_METHOD_BINDING_H_ |
+#define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_METHOD_BINDING_H_ |
+ |
+#include <string> |
+ |
+#include "content/common/content_export.h" |
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
+ |
+namespace content { |
+ |
+class BrowserPlugin; |
+ |
+// A BrowserPluginMethodBinding is an interface that can be implemented to |
+// define a method that can be tied to a BrowserPlugin object. This property |
+// can be added to a particular instance of BrowserPlugin through |
+// BrowserPlugin::AddMethodBinding. |
+class CONTENT_EXPORT BrowserPluginMethodBinding { |
+ public: |
+ virtual ~BrowserPluginMethodBinding() {} |
+ |
+ // Returns the name of the method. |
+ virtual const std::string& GetName() const = 0; |
+ |
+ // Returns the number of arguments expected by the method. |
+ virtual uint32 GetArgCount() const = 0; |
+ |
+ // Executes the method on |browser_plugin| with the provided |args|. |
+ // The return value is stored in |result|. |
+ virtual bool Invoke(const NPVariant* args, NPVariant* result) = 0; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_METHOD_BINDING_H_ |