OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 } | 831 } |
832 case NPNVsupportsCompositingCoreAnimationPluginsBool: { | 832 case NPNVsupportsCompositingCoreAnimationPluginsBool: { |
833 NPBool* supports_compositing = reinterpret_cast<NPBool*>(value); | 833 NPBool* supports_compositing = reinterpret_cast<NPBool*>(value); |
834 *supports_compositing = | 834 *supports_compositing = |
835 webkit::npapi::SupportsCoreAnimationPlugins() && | 835 webkit::npapi::SupportsCoreAnimationPlugins() && |
836 webkit::npapi::UsingCompositedCoreAnimationPlugins(); | 836 webkit::npapi::UsingCompositedCoreAnimationPlugins(); |
837 rv = NPERR_NO_ERROR; | 837 rv = NPERR_NO_ERROR; |
838 break; | 838 break; |
839 } | 839 } |
840 case NPNVsupportsUpdatedCocoaTextInputBool: { | 840 case NPNVsupportsUpdatedCocoaTextInputBool: { |
841 // We support the clarifications to the Cocoa IME event spec, but since | 841 // We support the clarifications to the Cocoa IME event spec. |
842 // IME currently only works on 10.6, only answer true there. | |
843 NPBool* supports_update = reinterpret_cast<NPBool*>(value); | 842 NPBool* supports_update = reinterpret_cast<NPBool*>(value); |
844 *supports_update = base::mac::IsOSSnowLeopardOrLater(); | 843 *supports_update = true; |
845 rv = NPERR_NO_ERROR; | 844 rv = NPERR_NO_ERROR; |
846 break; | 845 break; |
847 } | 846 } |
848 #endif // OS_MACOSX | 847 #endif // OS_MACOSX |
849 default: | 848 default: |
850 DVLOG(1) << "NPN_GetValue(" << variable << ") is not implemented yet."; | 849 DVLOG(1) << "NPN_GetValue(" << variable << ") is not implemented yet."; |
851 break; | 850 break; |
852 } | 851 } |
853 return rv; | 852 return rv; |
854 } | 853 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 } | 1125 } |
1127 | 1126 |
1128 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { | 1127 void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) { |
1129 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); | 1128 scoped_refptr<PluginInstance> plugin(FindInstance(instance)); |
1130 if (plugin.get()) { | 1129 if (plugin.get()) { |
1131 plugin->URLRedirectResponse(!!allow, notify_data); | 1130 plugin->URLRedirectResponse(!!allow, notify_data); |
1132 } | 1131 } |
1133 } | 1132 } |
1134 | 1133 |
1135 } // extern "C" | 1134 } // extern "C" |
OLD | NEW |