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

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

Issue 10823138: Disable support for the Mac NPAPI Carbon event model (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix string compare Created 8 years, 5 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/plugins/npapi/webplugin_delegate_impl_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/plugin_host.cc
diff --git a/webkit/plugins/npapi/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc
index 23977e250e4596c1be3cd671731418696d9edd33..00258903be1e83c881d7a1aebb9483478fc4bdd0 100644
--- a/webkit/plugins/npapi/plugin_host.cc
+++ b/webkit/plugins/npapi/plugin_host.cc
@@ -803,9 +803,6 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
break;
}
case NPNVsupportsCoreGraphicsBool:
-#ifndef NP_NO_CARBON
- case NPNVsupportsCarbonBool:
-#endif
case NPNVsupportsCocoaBool: {
// These drawing and event models are always supported.
NPBool* supports_model = reinterpret_cast<NPBool*>(value);
@@ -820,12 +817,15 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
rv = NPERR_NO_ERROR;
break;
}
+#ifndef NP_NO_CARBON
+ case NPNVsupportsCarbonBool:
+#endif
#ifndef NP_NO_QUICKDRAW
case NPNVsupportsQuickDrawBool:
#endif
case NPNVsupportsOpenGLBool: {
- // These drawing models are never supported. OpenGL was never widely
- // supported, and QuickDraw has been deprecated for years.
+ // These models are never supported. OpenGL was never widely supported,
+ // and QuickDraw and Carbon have been deprecated for quite some time.
NPBool* supports_model = reinterpret_cast<NPBool*>(value);
*supports_model = false;
rv = NPERR_NO_ERROR;
@@ -910,16 +910,11 @@ NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) {
return NPERR_GENERIC_ERROR;
}
case NPPVpluginEventModel: {
- // we support Carbon and Cocoa event models
+ // Only the Cocoa event model is supported.
int model = reinterpret_cast<int>(value);
- switch (model) {
-#ifndef NP_NO_CARBON
- case NPEventModelCarbon:
-#endif
- case NPEventModelCocoa:
- plugin->set_event_model(static_cast<NPEventModel>(model));
- return NPERR_NO_ERROR;
- break;
+ if (model == NPEventModelCocoa) {
+ plugin->set_event_model(static_cast<NPEventModel>(model));
+ return NPERR_NO_ERROR;
}
return NPERR_GENERIC_ERROR;
}
« no previous file with comments | « no previous file | webkit/plugins/npapi/webplugin_delegate_impl_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698