| Index: ash/wm/overview/window_selector_controller.cc
|
| diff --git a/ash/wm/overview/window_selector_controller.cc b/ash/wm/overview/window_selector_controller.cc
|
| index 490e57095a81f8cdefdbdc3c46eb87d27f5c67c3..84c83d20699bf03cb275916c02a83a29a8ba6431 100644
|
| --- a/ash/wm/overview/window_selector_controller.cc
|
| +++ b/ash/wm/overview/window_selector_controller.cc
|
| @@ -9,47 +9,9 @@
|
| #include "ash/wm/mru_window_tracker.h"
|
| #include "ash/wm/overview/window_selector.h"
|
| #include "ash/wm/window_util.h"
|
| -#include "ui/base/events/event.h"
|
| -#include "ui/base/events/event_handler.h"
|
|
|
| namespace ash {
|
|
|
| -namespace {
|
| -
|
| -// Filter to watch for the termination of a keyboard gesture to cycle through
|
| -// multiple windows.
|
| -class WindowSelectorEventFilter : public ui::EventHandler {
|
| - public:
|
| - WindowSelectorEventFilter();
|
| - virtual ~WindowSelectorEventFilter();
|
| -
|
| - // Overridden from ui::EventHandler:
|
| - virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE;
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(WindowSelectorEventFilter);
|
| -};
|
| -
|
| -// Watch for all keyboard events by filtering the root window.
|
| -WindowSelectorEventFilter::WindowSelectorEventFilter() {
|
| - Shell::GetInstance()->AddPreTargetHandler(this);
|
| -}
|
| -
|
| -WindowSelectorEventFilter::~WindowSelectorEventFilter() {
|
| - Shell::GetInstance()->RemovePreTargetHandler(this);
|
| -}
|
| -
|
| -void WindowSelectorEventFilter::OnKeyEvent(ui::KeyEvent* event) {
|
| - // Views uses VKEY_MENU for both left and right Alt keys.
|
| - if (event->key_code() == ui::VKEY_MENU &&
|
| - event->type() == ui::ET_KEY_RELEASED) {
|
| - Shell::GetInstance()->window_selector_controller()->AltKeyReleased();
|
| - // Warning: |this| will be deleted from here on.
|
| - }
|
| -}
|
| -
|
| -} // namespace
|
| -
|
| WindowSelectorController::WindowSelectorController() {
|
| }
|
|
|
| @@ -86,7 +48,6 @@ void WindowSelectorController::HandleCycleWindow(
|
| return;
|
|
|
| if (!IsSelecting()) {
|
| - event_handler_.reset(new WindowSelectorEventFilter());
|
| std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
|
| mru_window_tracker()->BuildMruWindowList();
|
| // Removing focus will hide popup windows like the omnibar or open menus.
|
| @@ -98,11 +59,6 @@ void WindowSelectorController::HandleCycleWindow(
|
| }
|
| }
|
|
|
| -void WindowSelectorController::AltKeyReleased() {
|
| - event_handler_.reset();
|
| - window_selector_->SelectWindow();
|
| -}
|
| -
|
| bool WindowSelectorController::IsSelecting() {
|
| return window_selector_.get() != NULL;
|
| }
|
|
|