OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "app/win/iat_patch_function.h" | 11 #include "app/win/iat_patch_function.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/metrics/stats_counters.h" | 15 #include "base/metrics/stats_counters.h" |
16 #include "base/registry.h" | |
17 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
18 #include "base/string_number_conversions.h" | 17 #include "base/string_number_conversions.h" |
19 #include "base/string_split.h" | 18 #include "base/string_split.h" |
20 #include "base/string_util.h" | 19 #include "base/string_util.h" |
21 #include "base/stringprintf.h" | 20 #include "base/stringprintf.h" |
| 21 #include "base/win/registry.h" |
22 #include "base/win/windows_version.h" | 22 #include "base/win/windows_version.h" |
23 #include "skia/ext/platform_canvas.h" | 23 #include "skia/ext/platform_canvas.h" |
24 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" | 24 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" |
25 #include "webkit/glue/plugins/default_plugin_shared.h" | 25 #include "webkit/glue/plugins/default_plugin_shared.h" |
26 #include "webkit/glue/plugins/plugin_constants_win.h" | 26 #include "webkit/glue/plugins/plugin_constants_win.h" |
27 #include "webkit/glue/plugins/plugin_instance.h" | 27 #include "webkit/glue/plugins/plugin_instance.h" |
28 #include "webkit/glue/plugins/plugin_lib.h" | 28 #include "webkit/glue/plugins/plugin_lib.h" |
29 #include "webkit/glue/plugins/plugin_list.h" | 29 #include "webkit/glue/plugins/plugin_list.h" |
30 #include "webkit/glue/plugins/plugin_stream_url.h" | 30 #include "webkit/glue/plugins/plugin_stream_url.h" |
31 #include "webkit/glue/plugins/webplugin.h" | 31 #include "webkit/glue/plugins/webplugin.h" |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 mouse_hook_ = SetWindowsHookEx(WH_MOUSE, MouseHookProc, NULL, | 409 mouse_hook_ = SetWindowsHookEx(WH_MOUSE, MouseHookProc, NULL, |
410 GetCurrentThreadId()); | 410 GetCurrentThreadId()); |
411 } | 411 } |
412 } | 412 } |
413 | 413 |
414 // On XP, WMP will use its old UI unless a registry key under HKLM has the | 414 // On XP, WMP will use its old UI unless a registry key under HKLM has the |
415 // name of the current process. We do it in the installer for admin users, | 415 // name of the current process. We do it in the installer for admin users, |
416 // for the rest patch this function. | 416 // for the rest patch this function. |
417 if ((quirks_ & PLUGIN_QUIRK_PATCH_REGENUMKEYEXW) && | 417 if ((quirks_ & PLUGIN_QUIRK_PATCH_REGENUMKEYEXW) && |
418 base::win::GetVersion() == base::win::VERSION_XP && | 418 base::win::GetVersion() == base::win::VERSION_XP && |
419 !RegKey().Open(HKEY_LOCAL_MACHINE, | 419 !base::win::RegKey().Open(HKEY_LOCAL_MACHINE, |
420 L"SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\chrome.exe", | 420 L"SOFTWARE\\Microsoft\\MediaPlayer\\ShimInclusionList\\chrome.exe", |
421 KEY_READ) && | 421 KEY_READ) && |
422 !g_iat_patch_reg_enum_key_ex_w.Pointer()->is_patched()) { | 422 !g_iat_patch_reg_enum_key_ex_w.Pointer()->is_patched()) { |
423 g_iat_patch_reg_enum_key_ex_w.Pointer()->Patch( | 423 g_iat_patch_reg_enum_key_ex_w.Pointer()->Patch( |
424 L"wmpdxm.dll", "advapi32.dll", "RegEnumKeyExW", | 424 L"wmpdxm.dll", "advapi32.dll", "RegEnumKeyExW", |
425 WebPluginDelegateImpl::RegEnumKeyExWPatch); | 425 WebPluginDelegateImpl::RegEnumKeyExWPatch); |
426 } | 426 } |
427 | 427 |
428 return true; | 428 return true; |
429 } | 429 } |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1400 case WM_LBUTTONUP: | 1400 case WM_LBUTTONUP: |
1401 case WM_MBUTTONUP: | 1401 case WM_MBUTTONUP: |
1402 case WM_RBUTTONUP: | 1402 case WM_RBUTTONUP: |
1403 ::ReleaseCapture(); | 1403 ::ReleaseCapture(); |
1404 break; | 1404 break; |
1405 | 1405 |
1406 default: | 1406 default: |
1407 break; | 1407 break; |
1408 } | 1408 } |
1409 } | 1409 } |
OLD | NEW |