diff options
author | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 19:25:11 +0000 |
---|---|---|
committer | skuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-17 19:25:11 +0000 |
commit | e935560ddeadae5b4f030f473d67091c1f990966 (patch) | |
tree | 055b661c833ff976772827716d3e8dbb7ff777e3 /ash | |
parent | 8f75872ade090a34dd518cc7cfa330bc5d5bb560 (diff) | |
download | chromium_src-e935560ddeadae5b4f030f473d67091c1f990966.zip chromium_src-e935560ddeadae5b4f030f473d67091c1f990966.tar.gz chromium_src-e935560ddeadae5b4f030f473d67091c1f990966.tar.bz2 |
Fixed bezel gesture
BUG=135694
TEST=Visual test
Review URL: https://chromiumcodereview.appspot.com/10786021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147065 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/wm/system_gesture_event_filter.cc | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/ash/wm/system_gesture_event_filter.cc b/ash/wm/system_gesture_event_filter.cc index 61b2358..b6e83a8 100644 --- a/ash/wm/system_gesture_event_filter.cc +++ b/ash/wm/system_gesture_event_filter.cc @@ -5,6 +5,7 @@ #include "ash/wm/system_gesture_event_filter.h" #include "ash/accelerators/accelerator_controller.h" +#include "ash/accelerators/accelerator_table.h" #include "ash/launcher/launcher.h" #include "ash/root_window_controller.h" #include "ash/screen_ash.h" @@ -654,13 +655,12 @@ bool SystemGestureEventFilter::HandleDeviceControl(aura::Window* target, bool SystemGestureEventFilter::HandleLauncherControl( aura::GestureEvent* event) { - ash::AcceleratorController* accelerator = - ash::Shell::GetInstance()->accelerator_controller(); - if (start_location_ == BEZEL_START_BOTTOM && event->details().scroll_y() < 0) - // We leave the work to switch to the next window to our accelerators. - accelerator->AcceleratorPressed( - ui::Accelerator(ui::VKEY_LWIN, ui::EF_CONTROL_DOWN)); - else + if (start_location_ == BEZEL_START_BOTTOM && + event->details().scroll_y() < 0) { + ash::AcceleratorController* accelerator = + ash::Shell::GetInstance()->accelerator_controller(); + accelerator->PerformAction(FOCUS_LAUNCHER, ui::Accelerator()); + } else return false; // No further notifications for this gesture. return true; @@ -670,18 +670,14 @@ bool SystemGestureEventFilter::HandleApplicationControl( aura::GestureEvent* event) { ash::AcceleratorController* accelerator = ash::Shell::GetInstance()->accelerator_controller(); - if (start_location_ == BEZEL_START_LEFT && event->details().scroll_x() > 0) { - // We leave the work to switch to the next window to our accelerators. - accelerator->AcceleratorPressed( - ui::Accelerator(ui::VKEY_F5, ui::EF_SHIFT_DOWN)); - } else if (start_location_ == BEZEL_START_RIGHT && - event->details().scroll_x() < 0) { - // We leave the work to switch to the previous window to our accelerators. - accelerator->AcceleratorPressed( - ui::Accelerator(ui::VKEY_F5, ui::EF_NONE)); - } else { + if (start_location_ == BEZEL_START_LEFT && event->details().scroll_x() > 0) + accelerator->PerformAction(CYCLE_BACKWARD_LINEAR, ui::Accelerator()); + else if (start_location_ == BEZEL_START_RIGHT && + event->details().scroll_x() < 0) + accelerator->PerformAction(CYCLE_FORWARD_LINEAR, ui::Accelerator()); + else return false; - } + // No further notifications for this gesture. return true; } |