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

Unified Diff: ui/aura_shell/shell_accelerator_filter.cc

Issue 8602003: Revert 110637 - Add ShellAcceleratorController that manages global keyboard accelerators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura_shell/shell_accelerator_filter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/shell_accelerator_filter.cc
===================================================================
--- ui/aura_shell/shell_accelerator_filter.cc (revision 110642)
+++ ui/aura_shell/shell_accelerator_filter.cc (working copy)
@@ -1,59 +0,0 @@
-// Copyright (c) 2011 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 "ui/aura_shell/shell_accelerator_filter.h"
-
-#include "ui/aura/desktop.h"
-#include "ui/aura/event.h"
-#include "ui/aura_shell/shell.h"
-#include "ui/aura_shell/shell_accelerator_controller.h"
-#include "ui/base/accelerator_manager.h"
-#include "ui/base/models/accelerator.h"
-
-namespace {
-const int kModifierFlagMask = (ui::EF_SHIFT_DOWN |
- ui::EF_CONTROL_DOWN |
- ui::EF_ALT_DOWN);
-} // namespace
-
-namespace aura_shell {
-namespace internal {
-
-////////////////////////////////////////////////////////////////////////////////
-// ShellAcceleratorFilter, public:
-
-ShellAcceleratorFilter::ShellAcceleratorFilter()
- : EventFilter(aura::Desktop::GetInstance()) {
-}
-
-ShellAcceleratorFilter::~ShellAcceleratorFilter() {
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// ShellAcceleratorFilter, EventFilter implementation:
-
-bool ShellAcceleratorFilter::PreHandleKeyEvent(aura::Window* target,
- aura::KeyEvent* event) {
- if (event->type() == ui::ET_KEY_PRESSED &&
- Shell::GetInstance()->accelerator_controller()->Process(
- ui::Accelerator(event->key_code(),
- event->flags() & kModifierFlagMask))) {
- return true;
- }
- return false;
-}
-
-bool ShellAcceleratorFilter::PreHandleMouseEvent(aura::Window* target,
- aura::MouseEvent* event) {
- return false;
-}
-
-ui::TouchStatus ShellAcceleratorFilter::PreHandleTouchEvent(
- aura::Window* target,
- aura::TouchEvent* event) {
- return ui::TOUCH_STATUS_UNKNOWN;
-}
-
-} // namespace internal
-} // namespace aura_shell
« no previous file with comments | « ui/aura_shell/shell_accelerator_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698