Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(651)

Side by Side Diff: webkit/glue/plugins/webplugin_delegate_impl_win.cc

Issue 3823002: Move windows version-related stuff out of base/win_util and into base/win/win... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/iat_patch.h" 12 #include "base/iat_patch.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" 16 #include "base/registry.h"
17 #include "base/scoped_ptr.h" 17 #include "base/scoped_ptr.h"
18 #include "base/string_number_conversions.h" 18 #include "base/string_number_conversions.h"
19 #include "base/string_split.h" 19 #include "base/string_split.h"
20 #include "base/string_util.h" 20 #include "base/string_util.h"
21 #include "base/stringprintf.h" 21 #include "base/stringprintf.h"
22 #include "base/win_util.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"
32 #include "webkit/glue/webkit_glue.h" 32 #include "webkit/glue/webkit_glue.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 if (quirks_ & PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE) { 408 if (quirks_ & PLUGIN_QUIRK_HANDLE_MOUSE_CAPTURE) {
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 win_util::GetWinVersion() == win_util::WINVERSION_XP && 418 base::win::GetVersion() == base::win::VERSION_XP &&
419 !RegKey().Open(HKEY_LOCAL_MACHINE, 419 !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;
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« sandbox/src/policy_target_test.cc ('K') | « webkit/glue/plugins/pepper_scrollbar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698