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

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: Fix bad rebase. Created 4 years, 9 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/child/npapi/plugin_host.cc
diff --git a/content/child/npapi/plugin_host.cc b/content/child/npapi/plugin_host.cc
index f5a04efaf5b437482f7036654b1116d9b6b25909..122837cc2c88d1e7e84dee36a17fa18f7820485d 100644
--- a/content/child/npapi/plugin_host.cc
+++ b/content/child/npapi/plugin_host.cc
@@ -511,46 +511,6 @@ 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;
- }
#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