diff options
author | dtapuska <dtapuska@chromium.org> | 2015-10-20 15:09:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-20 22:10:37 +0000 |
commit | 6d3c3b3afc4254ef33096895e349f43431ecbcb4 (patch) | |
tree | fa89119911a42e756bb43a0f749192003039e913 /win8 | |
parent | fdc03f9d18a90839cc7c389e98c0c9913457c484 (diff) | |
download | chromium_src-6d3c3b3afc4254ef33096895e349f43431ecbcb4.zip chromium_src-6d3c3b3afc4254ef33096895e349f43431ecbcb4.tar.gz chromium_src-6d3c3b3afc4254ef33096895e349f43431ecbcb4.tar.bz2 |
Set modifier flags for Caps, OS, Scroll and Num Lock on X11 and Windows.
Adjust the bit translation functions to ensure the values are set correctly on the WebInputEvent. Add support for querying the values from the native OS on Windows. Collapse duplicated code in the Windows event builder to query active key states.
BUG=265458
Review URL: https://codereview.chromium.org/1372253005
Cr-Commit-Position: refs/heads/master@{#355170}
Diffstat (limited to 'win8')
-rw-r--r-- | win8/metro_driver/chrome_app_view_ash.cc | 8 | ||||
-rw-r--r-- | win8/metro_driver/metro_driver.gyp | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/win8/metro_driver/chrome_app_view_ash.cc b/win8/metro_driver/chrome_app_view_ash.cc index 776f23e..0660120 100644 --- a/win8/metro_driver/chrome_app_view_ash.cc +++ b/win8/metro_driver/chrome_app_view_ash.cc @@ -16,13 +16,13 @@ #include "base/path_service.h" #include "base/single_thread_task_runner.h" #include "base/win/metro.h" -#include "base/win/win_util.h" #include "base/win/windows_version.h" #include "chrome/common/chrome_switches.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_channel_proxy.h" #include "ipc/ipc_sender.h" #include "ui/events/gesture_detection/motion_event.h" +#include "ui/events/win/system_event_state_lookup.h" #include "ui/gfx/geometry/point_conversions.h" #include "ui/gfx/win/dpi.h" #include "ui/metro_viewer/metro_viewer_messages.h" @@ -284,11 +284,11 @@ void RunMessageLoop(winui::Core::ICoreDispatcher* dispatcher) { // Helper to return the state of the shift/control/alt keys. uint32 GetKeyboardEventFlags() { uint32 flags = 0; - if (base::win::IsShiftPressed()) + if (ui::win::IsShiftPressed()) flags |= ui::EF_SHIFT_DOWN; - if (base::win::IsCtrlPressed()) + if (ui::win::IsCtrlPressed()) flags |= ui::EF_CONTROL_DOWN; - if (base::win::IsAltPressed()) + if (ui::win::IsAltPressed()) flags |= ui::EF_ALT_DOWN; return flags; } diff --git a/win8/metro_driver/metro_driver.gyp b/win8/metro_driver/metro_driver.gyp index 2720bb5..b1c17fd 100644 --- a/win8/metro_driver/metro_driver.gyp +++ b/win8/metro_driver/metro_driver.gyp @@ -53,6 +53,7 @@ '../../crypto/crypto.gyp:crypto', '../../ipc/ipc.gyp:ipc', '../../sandbox/sandbox.gyp:sandbox', + '../../ui/events/events.gyp:events', '../../ui/metro_viewer/metro_viewer.gyp:metro_viewer_messages', '../../ui/gfx/gfx.gyp:gfx', '../../ui/gfx/gfx.gyp:gfx_geometry', |