| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/glue/plugins/plugin_host.h" | 5 #include "webkit/glue/plugins/plugin_host.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/string_piece.h" | 10 #include "base/string_piece.h" |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 case NPNVsupportsCocoaBool: { | 787 case NPNVsupportsCocoaBool: { |
| 788 // we do support these drawing and event models. | 788 // we do support these drawing and event models. |
| 789 NPBool* supports_model = reinterpret_cast<NPBool*>(value); | 789 NPBool* supports_model = reinterpret_cast<NPBool*>(value); |
| 790 *supports_model = TRUE; | 790 *supports_model = TRUE; |
| 791 rv = NPERR_NO_ERROR; | 791 rv = NPERR_NO_ERROR; |
| 792 break; | 792 break; |
| 793 } | 793 } |
| 794 case NPNVsupportsCoreAnimationBool: { | 794 case NPNVsupportsCoreAnimationBool: { |
| 795 // We only support the Core Animation model on 10.6 and higher | 795 // We only support the Core Animation model on 10.6 and higher |
| 796 NPBool* supports_model = reinterpret_cast<NPBool*>(value); | 796 NPBool* supports_model = reinterpret_cast<NPBool*>(value); |
| 797 // Our Core Animation support currently doesn't handle QuickTime correctly | 797 *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE; |
| 798 // (see <http://crbug.com/38336>), so for now we don't allow QuickTime to | |
| 799 // negotiate that model. | |
| 800 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); | |
| 801 if (plugin && | |
| 802 plugin->plugin_lib()->plugin_info().name.find(L"QuickTime") != | |
| 803 std::wstring::npos) | |
| 804 *supports_model = FALSE; | |
| 805 else | |
| 806 *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE; | |
| 807 rv = NPERR_NO_ERROR; | 798 rv = NPERR_NO_ERROR; |
| 808 break; | 799 break; |
| 809 } | 800 } |
| 810 case NPNVsupportsOpenGLBool: { | 801 case NPNVsupportsOpenGLBool: { |
| 811 // This drawing model was never widely supported, and we don't plan to | 802 // This drawing model was never widely supported, and we don't plan to |
| 812 // support it. | 803 // support it. |
| 813 NPBool* supports_model = reinterpret_cast<NPBool*>(value); | 804 NPBool* supports_model = reinterpret_cast<NPBool*>(value); |
| 814 *supports_model = FALSE; | 805 *supports_model = FALSE; |
| 815 rv = NPERR_NO_ERROR; | 806 rv = NPERR_NO_ERROR; |
| 816 break; | 807 break; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); | 1070 scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); |
| 1080 if (plugin.get()) { | 1071 if (plugin.get()) { |
| 1081 return plugin->ConvertPoint(sourceX, sourceY, sourceSpace, | 1072 return plugin->ConvertPoint(sourceX, sourceY, sourceSpace, |
| 1082 destX, destY, destSpace); | 1073 destX, destY, destSpace); |
| 1083 } | 1074 } |
| 1084 NOTREACHED(); | 1075 NOTREACHED(); |
| 1085 return FALSE; | 1076 return FALSE; |
| 1086 } | 1077 } |
| 1087 | 1078 |
| 1088 } // extern "C" | 1079 } // extern "C" |
| OLD | NEW |