summaryrefslogtreecommitdiffstats
path: root/content/renderer/browser_plugin
diff options
context:
space:
mode:
Diffstat (limited to 'content/renderer/browser_plugin')
-rw-r--r--content/renderer/browser_plugin/browser_plugin.cc14
-rw-r--r--content/renderer/browser_plugin/browser_plugin.h4
-rw-r--r--content/renderer/browser_plugin/browser_plugin_bindings.cc3
3 files changed, 1 insertions, 20 deletions
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index a7c0c71..d2756cb 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -1138,10 +1138,6 @@ bool BrowserPlugin::initialize(WebPluginContainer* container) {
if (!GetContentClient()->renderer()->AllowBrowserPlugin(container))
return false;
- // Tell |container| to allow this plugin to use script objects.
- npp_.reset(new NPP_t);
- container->allowScriptObjects();
-
bindings_.reset(new BrowserPluginBindings(this));
container_ = container;
container_->setWantsWheelEvents(true);
@@ -1185,12 +1181,6 @@ void BrowserPlugin::EnableCompositing(bool enable) {
}
void BrowserPlugin::destroy() {
- // If the plugin was initialized then it has a valid |npp_| identifier, and
- // the |container_| must clear references to the plugin's script objects.
- DCHECK(!npp_ || container_);
- if (container_)
- container_->clearScriptObjects();
-
// The BrowserPlugin's WebPluginContainer is deleted immediately after this
// call returns, so let's not keep a reference to it around.
g_plugin_container_map.Get().erase(container_);
@@ -1213,10 +1203,6 @@ NPObject* BrowserPlugin::scriptableObject() {
return browser_plugin_np_object;
}
-NPP BrowserPlugin::pluginNPP() {
- return npp_.get();
-}
-
bool BrowserPlugin::supportsKeyboardFocus() const {
return true;
}
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index 10a48f7..3d7ee9a 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -174,7 +174,6 @@ class CONTENT_EXPORT BrowserPlugin :
virtual bool initialize(WebKit::WebPluginContainer* container) OVERRIDE;
virtual void destroy() OVERRIDE;
virtual NPObject* scriptableObject() OVERRIDE;
- virtual struct _NPP* pluginNPP() OVERRIDE;
virtual bool supportsKeyboardFocus() const OVERRIDE;
virtual bool canProcessDrag() const OVERRIDE;
virtual void paint(
@@ -442,9 +441,6 @@ class CONTENT_EXPORT BrowserPlugin :
bool compositing_enabled_;
scoped_refptr<BrowserPluginCompositingHelper> compositing_helper_;
- // Used to identify the plugin to WebBindings.
- scoped_ptr<struct _NPP> npp_;
-
// Weak factory used in v8 |MakeWeak| callback, since the v8 callback might
// get called after BrowserPlugin has been destroyed.
base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_;
diff --git a/content/renderer/browser_plugin/browser_plugin_bindings.cc b/content/renderer/browser_plugin/browser_plugin_bindings.cc
index 7857ed5..9ded3f9 100644
--- a/content/renderer/browser_plugin/browser_plugin_bindings.cc
+++ b/content/renderer/browser_plugin/browser_plugin_bindings.cc
@@ -817,8 +817,7 @@ BrowserPluginBindings::BrowserPluginBindings(BrowserPlugin* instance)
np_object_(NULL),
weak_ptr_factory_(this) {
NPObject* obj =
- WebBindings::createObject(instance->pluginNPP(),
- &browser_plugin_message_class);
+ WebBindings::createObject(NULL, &browser_plugin_message_class);
np_object_ = static_cast<BrowserPluginBindings::BrowserPluginNPObject*>(obj);
np_object_->message_channel = weak_ptr_factory_.GetWeakPtr();