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

Unified Diff: content/public/renderer/browser_plugin/browser_plugin_property_binding.h

Issue 11826005: Browser Plugin: Implement BrowserPluginObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 years, 10 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: content/public/renderer/browser_plugin/browser_plugin_property_binding.h
diff --git a/content/public/renderer/browser_plugin/browser_plugin_property_binding.h b/content/public/renderer/browser_plugin/browser_plugin_property_binding.h
new file mode 100644
index 0000000000000000000000000000000000000000..8e62316ac962cce8008549c37989f2fc1fb97b2c
--- /dev/null
+++ b/content/public/renderer/browser_plugin/browser_plugin_property_binding.h
@@ -0,0 +1,42 @@
+// 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_PROPERTY_BINDING_H_
+#define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_PROPERTY_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 BrowserPluginPropertyBinding is an interface that can be implemented to
+// define a property that can be tied to a BrowserPlugin object. This property
+// can be added to a particular instance of BrowserPlugin through
+// BrowserPlugin::AddPropertyBinding.
+class CONTENT_EXPORT BrowserPluginPropertyBinding {
+ public:
+ virtual ~BrowserPluginPropertyBinding() {}
+
+ // Returns the name of the property.
+ virtual const std::string& GetName() const = 0;
+
+ // Returns whether a getter for the property exits.
+ // If it does, the value will be stored in |result|.
+ virtual bool GetProperty(NPVariant* result) = 0;
+
+ // Returns whether a setter for the property exists. The value assigned to the
+ // property is stored in |value|.
+ virtual bool SetProperty(NPObject* np_obj, const NPVariant* value) = 0;
+
+ // Called when there is an attempt to remove the property.
+ virtual void RemoveProperty(NPObject* np_obj) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_PROPERTY_BINDING_H_
« no previous file with comments | « content/public/renderer/browser_plugin/browser_plugin_observer.cc ('k') | content/public/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698