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

Side by Side Diff: webkit/plugins/npapi/plugin_host.cc

Issue 6259013: Update Mac plugin IME handling to match updated spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to trunk Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/mozilla/README.chromium ('k') | webkit/plugins/npapi/webplugin.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/npapi/plugin_host.h" 5 #include "webkit/plugins/npapi/plugin_host.h"
6 6
7 #include "app/gfx/gl/gl_context.h" 7 #include "app/gfx/gl/gl_context.h"
8 #include "app/gfx/gl/gl_implementation.h" 8 #include "app/gfx/gl/gl_implementation.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 break; 833 break;
834 } 834 }
835 case NPNVsupportsOpenGLBool: { 835 case NPNVsupportsOpenGLBool: {
836 // This drawing model was never widely supported, and we don't plan to 836 // This drawing model was never widely supported, and we don't plan to
837 // support it. 837 // support it.
838 NPBool* supports_model = reinterpret_cast<NPBool*>(value); 838 NPBool* supports_model = reinterpret_cast<NPBool*>(value);
839 *supports_model = false; 839 *supports_model = false;
840 rv = NPERR_NO_ERROR; 840 rv = NPERR_NO_ERROR;
841 break; 841 break;
842 } 842 }
843 case NPNVsupportsUpdatedCocoaTextInputBool: {
844 // We support the clarifications to the Cocoa IME event spec, but since
845 // IME currently only works on 10.6, only answer true there.
846 NPBool* supports_update = reinterpret_cast<NPBool*>(value);
847 int32 major, minor, bugfix;
848 base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
849 *supports_update = major > 10 || (major == 10 && minor > 5);
850 rv = NPERR_NO_ERROR;
851 break;
852 }
843 #endif // OS_MACOSX 853 #endif // OS_MACOSX
844 case NPNVPepperExtensions: 854 case NPNVPepperExtensions:
845 // Available for any plugin that attempts to get it. 855 // Available for any plugin that attempts to get it.
846 // If the plugin is not started in a Pepper implementation, it 856 // If the plugin is not started in a Pepper implementation, it
847 // will likely fail when it tries to use any of the functions 857 // will likely fail when it tries to use any of the functions
848 // attached to the extension vector. 858 // attached to the extension vector.
849 rv = webkit::npapi::GetPepperExtensionsFunctions(value); 859 rv = webkit::npapi::GetPepperExtensionsFunctions(value);
850 break; 860 break;
851 default: 861 default:
852 DVLOG(1) << "NPN_GetValue(" << variable << ") is not implemented yet."; 862 DVLOG(1) << "NPN_GetValue(" << variable << ") is not implemented yet.";
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 } 1132 }
1123 1133
1124 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { 1134 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) {
1125 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); 1135 scoped_refptr<PluginInstance> plugin(FindInstance(instance));
1126 if (plugin.get()) { 1136 if (plugin.get()) {
1127 plugin->URLRedirectResponse(!!allow, notify_data); 1137 plugin->URLRedirectResponse(!!allow, notify_data);
1128 } 1138 }
1129 } 1139 }
1130 1140
1131 } // extern "C" 1141 } // extern "C"
OLDNEW
« no previous file with comments | « third_party/mozilla/README.chromium ('k') | webkit/plugins/npapi/webplugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698