OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/webplugin_delegate_impl.h" | 5 #include "webkit/glue/plugins/webplugin_delegate_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } else if (filename == "nppdf32.dll") { | 158 } else if (filename == "nppdf32.dll") { |
159 // Check for the version number above or equal 9. | 159 // Check for the version number above or equal 9. |
160 std::vector<std::wstring> version; | 160 std::vector<std::wstring> version; |
161 SplitString(plugin_info.version, L'.', &version); | 161 SplitString(plugin_info.version, L'.', &version); |
162 if (version.size() > 0) { | 162 if (version.size() > 0) { |
163 int major = static_cast<int>(StringToInt64(version[0])); | 163 int major = static_cast<int>(StringToInt64(version[0])); |
164 if (major >= 9) { | 164 if (major >= 9) { |
165 quirks_ |= PLUGIN_QUIRK_DIE_AFTER_UNLOAD; | 165 quirks_ |= PLUGIN_QUIRK_DIE_AFTER_UNLOAD; |
166 } | 166 } |
167 } | 167 } |
| 168 quirks_ |= PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS; |
168 } else if (plugin_info.name.find(L"Windows Media Player") != | 169 } else if (plugin_info.name.find(L"Windows Media Player") != |
169 std::wstring::npos) { | 170 std::wstring::npos) { |
170 // Windows Media Player needs two NPP_SetWindow calls. | 171 // Windows Media Player needs two NPP_SetWindow calls. |
171 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; | 172 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; |
172 } else if (instance_->mime_type() == "audio/x-pn-realaudio-plugin" || | 173 } else if (instance_->mime_type() == "audio/x-pn-realaudio-plugin" || |
173 filename == "nppl3260.dll") { | 174 filename == "nppl3260.dll") { |
174 quirks_ |= PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY; | 175 quirks_ |= PLUGIN_QUIRK_DONT_CALL_WND_PROC_RECURSIVELY; |
175 } else if (plugin_info.name.find(L"VLC Multimedia Plugin") != | 176 } else if (plugin_info.name.find(L"VLC Multimedia Plugin") != |
176 std::wstring::npos) { | 177 std::wstring::npos) { |
177 // VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window | 178 // VLC hangs on NPP_Destroy if we call NPP_SetWindow with a null window |
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1166 | 1167 |
1167 // It is ok to pass NULL here to GetCursor as we are not looking for cursor | 1168 // It is ok to pass NULL here to GetCursor as we are not looking for cursor |
1168 // types defined by Webkit. | 1169 // types defined by Webkit. |
1169 HCURSOR previous_cursor = | 1170 HCURSOR previous_cursor = |
1170 current_plugin_instance_->current_windowless_cursor_.GetCursor(NULL); | 1171 current_plugin_instance_->current_windowless_cursor_.GetCursor(NULL); |
1171 | 1172 |
1172 current_plugin_instance_->current_windowless_cursor_.InitFromExternalCursor( | 1173 current_plugin_instance_->current_windowless_cursor_.InitFromExternalCursor( |
1173 cursor); | 1174 cursor); |
1174 return previous_cursor; | 1175 return previous_cursor; |
1175 } | 1176 } |
OLD | NEW |