| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE; | 260 quirks_ |= PLUGIN_QUIRK_THROTTLE_WM_USER_PLUS_ONE; |
| 261 quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR; | 261 quirks_ |= PLUGIN_QUIRK_PATCH_SETCURSOR; |
| 262 } else if (filename == kAcrobatReaderPlugin) { | 262 } else if (filename == kAcrobatReaderPlugin) { |
| 263 // Check for the version number above or equal 9. | 263 // Check for the version number above or equal 9. |
| 264 std::vector<std::wstring> version; | 264 std::vector<std::wstring> version; |
| 265 SplitString(plugin_info.version, L'.', &version); | 265 SplitString(plugin_info.version, L'.', &version); |
| 266 if (version.size() > 0) { | 266 if (version.size() > 0) { |
| 267 int major = static_cast<int>(StringToInt64(version[0])); | 267 int major = static_cast<int>(StringToInt64(version[0])); |
| 268 if (major >= 9) { | 268 if (major >= 9) { |
| 269 quirks_ |= PLUGIN_QUIRK_DIE_AFTER_UNLOAD; | 269 quirks_ |= PLUGIN_QUIRK_DIE_AFTER_UNLOAD; |
| 270 |
| 271 // 9.2 needs this. |
| 272 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; |
| 270 } | 273 } |
| 271 } | 274 } |
| 272 quirks_ |= PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS; | 275 quirks_ |= PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS; |
| 273 } else if (plugin_info.name.find(L"Windows Media Player") != | 276 } else if (plugin_info.name.find(L"Windows Media Player") != |
| 274 std::wstring::npos) { | 277 std::wstring::npos) { |
| 275 // Windows Media Player needs two NPP_SetWindow calls. | 278 // Windows Media Player needs two NPP_SetWindow calls. |
| 276 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; | 279 quirks_ |= PLUGIN_QUIRK_SETWINDOW_TWICE; |
| 277 | 280 |
| 278 // Windowless mode doesn't work in the WMP NPAPI plugin. | 281 // Windowless mode doesn't work in the WMP NPAPI plugin. |
| 279 quirks_ |= PLUGIN_QUIRK_NO_WINDOWLESS; | 282 quirks_ |= PLUGIN_QUIRK_NO_WINDOWLESS; |
| (...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1262 GetKeyPath(key).find(L"Microsoft\\MediaPlayer\\ShimInclusionList") != | 1265 GetKeyPath(key).find(L"Microsoft\\MediaPlayer\\ShimInclusionList") != |
| 1263 std::wstring::npos) { | 1266 std::wstring::npos) { |
| 1264 static const wchar_t kChromeExeName[] = L"chrome.exe"; | 1267 static const wchar_t kChromeExeName[] = L"chrome.exe"; |
| 1265 wcsncpy_s(name, orig_size, kChromeExeName, arraysize(kChromeExeName)); | 1268 wcsncpy_s(name, orig_size, kChromeExeName, arraysize(kChromeExeName)); |
| 1266 *name_size = | 1269 *name_size = |
| 1267 std::min(orig_size, static_cast<DWORD>(arraysize(kChromeExeName))); | 1270 std::min(orig_size, static_cast<DWORD>(arraysize(kChromeExeName))); |
| 1268 } | 1271 } |
| 1269 | 1272 |
| 1270 return rv; | 1273 return rv; |
| 1271 } | 1274 } |
| OLD | NEW |