summaryrefslogtreecommitdiffstats
path: root/ash/accelerators/accelerator_dispatcher_win.cc
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-06 15:29:50 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-06 15:29:50 +0000
commiteaef2a3f543f50bdd913d0a3fbe45f270639b9cf (patch)
treecef812ee43113dc874aaaf0e1d24074da9c6649e /ash/accelerators/accelerator_dispatcher_win.cc
parent0f5c8c8def9e8d1af6e76dee819df4be8d30f4e6 (diff)
downloadchromium_src-eaef2a3f543f50bdd913d0a3fbe45f270639b9cf.zip
chromium_src-eaef2a3f543f50bdd913d0a3fbe45f270639b9cf.tar.gz
chromium_src-eaef2a3f543f50bdd913d0a3fbe45f270639b9cf.tar.bz2
Revert 120566 - Implements accelerator handling for menus on aura.
BUG=105964 TEST=Manual Depends on http://codereview.chromium.org/9124021 Review URL: https://chromiumcodereview.appspot.com/9224001 TBR=pkotwicz@chromium.org Review URL: https://chromiumcodereview.appspot.com/9310124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators/accelerator_dispatcher_win.cc')
-rw-r--r--ash/accelerators/accelerator_dispatcher_win.cc39
1 files changed, 0 insertions, 39 deletions
diff --git a/ash/accelerators/accelerator_dispatcher_win.cc b/ash/accelerators/accelerator_dispatcher_win.cc
deleted file mode 100644
index 4682275..0000000
--- a/ash/accelerators/accelerator_dispatcher_win.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/accelerators/accelerator_dispatcher.h"
-
-#include "ash/accelerators/accelerator_controller.h"
-#include "ash/shell.h"
-#include "ui/aura/event.h"
-#include "ui/aura/root_window.h"
-#include "ui/base/accelerators/accelerator.h"
-
-namespace ash {
-
-namespace {
-
-const int kModifierMask = (ui::EF_SHIFT_DOWN |
- ui::EF_CONTROL_DOWN |
- ui::EF_ALT_DOWN);
-} // namespace
-
-bool AcceleratorDispatcher::Dispatch(const MSG& msg) {
- ash::Shell* shell = ash::Shell::GetInstance();
- if (shell->IsScreenLocked())
- return aura::RootWindow::GetInstance()->GetDispatcher()->Dispatch(msg);
-
- if(msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN) {
- ash::AcceleratorController* accelerator_controller =
- shell->accelerator_controller();
- ui::Accelerator accelerator(ui::KeyboardCodeFromNative(msg),
- ui::EventFlagsFromNative(msg) & kModifierMask);
- if (accelerator_controller && accelerator_controller->Process(accelerator))
- return true;
- }
-
- return nested_dispatcher_->Dispatch(msg);
-}
-
-} // namespace ash