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

Unified Diff: webkit/glue/plugins/plugin_host.cc

Issue 211031: Remove the temporary Mac plugin whitelist.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « no previous file | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/plugin_host.cc
===================================================================
--- webkit/glue/plugins/plugin_host.cc (revision 26675)
+++ webkit/glue/plugins/plugin_host.cc (working copy)
@@ -784,6 +784,14 @@
break;
}
#if defined(OS_MACOSX)
+ case NPNVpluginDrawingModel:
+ {
+ // return the drawing model that was negotiated when we initialized
+ scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ *reinterpret_cast<int*>(value) = plugin->drawing_model();
+ rv = NPERR_NO_ERROR;
+ break;
+ }
case NPNVsupportsQuickDrawBool:
{
// we do not support the QuickDraw drawing model
@@ -851,15 +859,35 @@
DLOG(INFO) << "NPN_SetValue(NPPVpluginKeepLibraryInMemory) is not implemented.";
return NPERR_GENERIC_ERROR;
#if defined(OS_MACOSX)
- case NPNVpluginDrawingModel:
- // we only support the CoreGraphics drawing model
- if (reinterpret_cast<int>(value) == NPDrawingModelCoreGraphics)
+ case NPPVpluginDrawingModel:
+ {
+ // we only admit to supporting the CoreGraphics drawing model. The logic
+ // here is that our QuickDraw plugin support is so rudimentary that we
+ // only want to use it as a fallback to keep plugins from crashing: if
+ // a plugin knows enough to ask, we want them to use CoreGraphics.
+ int model = reinterpret_cast<int>(value);
+ if (model == NPDrawingModelCoreGraphics) {
+ plugin->set_drawing_model(model);
return NPERR_NO_ERROR;
+ }
return NPERR_GENERIC_ERROR;
+ }
+ case NPPVpluginEventModel:
+ {
+ // we only support the Carbon event model
+ int model = reinterpret_cast<int>(value);
+ switch (model) {
+ case NPNVsupportsCarbonBool:
+ plugin->set_event_model(model);
+ return NPERR_NO_ERROR;
+ break;
+ }
+ return NPERR_GENERIC_ERROR;
+ }
#endif
default:
// TODO: implement me
- DLOG(INFO) << "NPN_SetValue(" << variable << ") is not implemented.";
+ LOG(WARNING) << "NPN_SetValue(" << variable << ") is not implemented.";
break;
}
« no previous file with comments | « no previous file | webkit/glue/plugins/plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698