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

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 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
« no previous file with comments | « content/child/npapi/npruntime_util.cc ('k') | content/child/npapi/plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/npapi/plugin_host.cc
diff --git a/content/child/npapi/plugin_host.cc b/content/child/npapi/plugin_host.cc
index f560061161b9ac302ac5fba2a259ea6ca17a4c2e..867537be2d847644412439079455390f32953a4c 100644
--- a/content/child/npapi/plugin_host.cc
+++ b/content/child/npapi/plugin_host.cc
@@ -509,46 +509,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;
- }
case NPNVjavascriptEnabledBool: {
// yes, JS is enabled.
*((void**)value) = (void*)1;
« no previous file with comments | « content/child/npapi/npruntime_util.cc ('k') | content/child/npapi/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698