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

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

Issue 1825253002: Revert of Remove a bunch of NPAPI quirks and related support code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_windowed_plugins
Patch Set: 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/BUILD.gn ('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..f5a04efaf5b437482f7036654b1116d9b6b25909 100644
--- a/content/child/npapi/plugin_host.cc
+++ b/content/child/npapi/plugin_host.cc
@@ -502,6 +502,8 @@
// Variables:
// NPNVxDisplay (unix only)
// NPNVxtAppContext (unix only)
+ // NPNVnetscapeWindow (win only) - Gets the native window on which the
+ // plugin drawing occurs, returns HWND
// NPNVjavascriptEnabledBool: tells whether Javascript is enabled
// NPNVasdEnabledBool: tells whether SmartUpdate is enabled
// NPNVOfflineBool: tells whether offline-mode is enabled
@@ -549,6 +551,19 @@
}
break;
}
+ #if !defined(OS_MACOSX) // OS X doesn't have windowed plugins.
+ case NPNVnetscapeWindow: {
+ scoped_refptr<PluginInstance> plugin = FindInstance(id);
+ if (!plugin.get()) {
+ NOTREACHED();
+ return NPERR_INVALID_INSTANCE_ERROR;
+ }
+ gfx::PluginWindowHandle handle = plugin->window_handle();
+ *((void**)value) = (void*)handle;
+ rv = NPERR_NO_ERROR;
+ break;
+ }
+ #endif
case NPNVjavascriptEnabledBool: {
// yes, JS is enabled.
*((void**)value) = (void*)1;
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/npapi/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698