OLD | NEW |
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 Loading... |
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 Loading... |
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" |
OLD | NEW |