summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
Diffstat (limited to 'content/renderer')
-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
-rw-r--r--content/renderer/webplugin_delegate_proxy.cc6
-rw-r--r--content/renderer/webplugin_delegate_proxy.h4
5 files changed, 1 insertions, 30 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();
diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc
index 6663239..bc49803 100644
--- a/content/renderer/webplugin_delegate_proxy.cc
+++ b/content/renderer/webplugin_delegate_proxy.cc
@@ -212,7 +212,6 @@ WebPluginDelegateProxy::WebPluginDelegateProxy(
mime_type_(mime_type),
instance_id_(MSG_ROUTING_NONE),
npobject_(NULL),
- npp_(new NPP_t),
sad_plugin_(NULL),
invalidate_pending_(false),
transparent_(false),
@@ -744,11 +743,6 @@ NPObject* WebPluginDelegateProxy::GetPluginScriptableObject() {
return WebBindings::retainObject(npobject_);
}
-NPP WebPluginDelegateProxy::GetPluginNPP() {
- // Return a dummy NPP for WebKit to use to identify this plugin.
- return npp_.get();
-}
-
bool WebPluginDelegateProxy::GetFormValue(string16* value) {
bool success = false;
Send(new PluginMsg_GetFormValue(instance_id_, value, &success));
diff --git a/content/renderer/webplugin_delegate_proxy.h b/content/renderer/webplugin_delegate_proxy.h
index f39d2ae..5ede581 100644
--- a/content/renderer/webplugin_delegate_proxy.h
+++ b/content/renderer/webplugin_delegate_proxy.h
@@ -68,7 +68,6 @@ class WebPluginDelegateProxy
const gfx::Rect& clip_rect) OVERRIDE;
virtual void Paint(WebKit::WebCanvas* canvas, const gfx::Rect& rect) OVERRIDE;
virtual NPObject* GetPluginScriptableObject() OVERRIDE;
- virtual struct _NPP* GetPluginNPP() OVERRIDE;
virtual bool GetFormValue(string16* value) OVERRIDE;
virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason,
int notify_id) OVERRIDE;
@@ -267,9 +266,6 @@ class WebPluginDelegateProxy
NPObject* npobject_;
base::WeakPtr<NPObjectStub> window_script_object_;
- // Dummy NPP used to uniquely identify this plugin.
- scoped_ptr<NPP_t> npp_;
-
// Event passed in by the plugin process and is used to decide if messages
// need to be pumped in the NPP_HandleEvent sync call.
scoped_ptr<base::WaitableEvent> modal_loop_pump_messages_event_;