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

Unified Diff: content/child/npapi/plugin_host.cc

Issue 1483733002: Remove support for NPObjects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/child/npapi/plugin_host.cc
diff --git a/content/child/npapi/plugin_host.cc b/content/child/npapi/plugin_host.cc
index 47467ae6bc0d4056caaccff14965f43ce5b37c15..7b16c0a5a2c570a9d46c161743ef6894cb0b5add 100644
--- a/content/child/npapi/plugin_host.cc
+++ b/content/child/npapi/plugin_host.cc
@@ -522,46 +522,9 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
NPError rv = NPERR_GENERIC_ERROR;
switch (static_cast<int>(variable)) {
- case NPNVWindowNPObject: {
- scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
- NOTREACHED();
- return NPERR_INVALID_INSTANCE_ERROR;
- }
- NPObject *np_object = plugin->webplugin()->GetWindowScriptNPObject();
- // Return value is expected to be retained, as
- // described here:
- // <http://www.mozilla.org/projects/plugins/npruntime.html#browseraccess>
- if (np_object) {
- WebBindings::retainObject(np_object);
- void **v = (void **)value;
- *v = np_object;
- rv = NPERR_NO_ERROR;
- } else {
- NOTREACHED();
- }
- break;
- }
- case NPNVPluginElementNPObject: {
- scoped_refptr<PluginInstance> plugin(FindInstance(id));
- if (!plugin.get()) {
- NOTREACHED();
- return NPERR_INVALID_INSTANCE_ERROR;
- }
- NPObject *np_object = plugin->webplugin()->GetPluginElement();
- // Return value is expected to be retained, as
- // described here:
- // <http://www.mozilla.org/projects/plugins/npruntime.html#browseraccess>
- if (np_object) {
- WebBindings::retainObject(np_object);
- void** v = static_cast<void**>(value);
- *v = np_object;
- rv = NPERR_NO_ERROR;
- } else {
- NOTREACHED();
- }
- break;
- }
+ case NPNVWindowNPObject:
+ case NPNVPluginElementNPObject:
+ return NPERR_INVALID_INSTANCE_ERROR;
Wez 2016/01/14 21:57:08 You're not failing here because the plugin instanc
dcheng 2016/01/14 22:05:50 I'll update this in the next rebasing + update pat
Wez 2016/01/19 17:58:28 ACK
#if !defined(OS_MACOSX) // OS X doesn't have windowed plugins.
case NPNVnetscapeWindow: {
scoped_refptr<PluginInstance> plugin = FindInstance(id);

Powered by Google App Engine
This is Rietveld 408576698