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

Unified Diff: content/renderer/browser_plugin/browser_plugin_bindings.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/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 91e8ced84390c0a5f56263d455e2c2f8ab197bb9..c3181fadbd567dece374760f82c43f4d3bce1d01 100644
--- a/content/renderer/browser_plugin/browser_plugin_bindings.h
+++ b/content/renderer/browser_plugin/browser_plugin_bindings.h
@@ -12,7 +12,7 @@
namespace content {
-class BrowserPlugin;
+class BrowserPluginImpl;
class BrowserPluginMethodBinding;
class BrowserPluginPropertyBinding;
@@ -29,12 +29,12 @@ class BrowserPluginBindings {
base::WeakPtr<BrowserPluginBindings> message_channel;
};
- explicit BrowserPluginBindings(BrowserPlugin* instance);
+ explicit BrowserPluginBindings(BrowserPluginImpl* instance);
~BrowserPluginBindings();
NPObject* np_object() const { return np_object_; }
- BrowserPlugin* instance() const { return instance_; }
+ BrowserPluginImpl* instance() const { return instance_; }
bool HasMethod(NPIdentifier name) const;
@@ -49,8 +49,15 @@ class BrowserPluginBindings {
const NPVariant* variant);
bool GetProperty(NPIdentifier name, NPVariant* result);
bool RemoveProperty(NPObject *np_obj, NPIdentifier name);
+
+ // Adds a method/property binding. The binding's lifetime is managed by
+ // BrowserPluginBindings. BrowserPluginBindings is destroyed prior to
+ // cleaning up BrowserPluginObservers.
+ void AddMethodBinding(BrowserPluginMethodBinding* method_binding);
+ void AddPropertyBinding(BrowserPluginPropertyBinding* property_binding);
+
private:
- BrowserPlugin* instance_;
+ BrowserPluginImpl* instance_;
// The NPObject we use to expose postMessage to JavaScript.
BrowserPluginNPObject* np_object_;
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/browser_plugin/browser_plugin_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698