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

Unified Diff: ash/accelerators/nested_accelerator_delegate.cc

Issue 298703007: Refactor and move ash independent nested accelerator code to ui/wm/core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skip test if platform does not support PES Created 6 years, 7 months 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 | « ash/accelerators/nested_accelerator_delegate.h ('k') | ash/accelerators/nested_dispatcher_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/nested_accelerator_delegate.cc
diff --git a/ash/accelerators/accelerator_dispatcher.cc b/ash/accelerators/nested_accelerator_delegate.cc
similarity index 85%
rename from ash/accelerators/accelerator_dispatcher.cc
rename to ash/accelerators/nested_accelerator_delegate.cc
index c484101879f6b83efa336021ceb632b14cdf03c0..9e5682b6d28e5d1daba6ab8469ed9adf77c94ef2 100644
--- a/ash/accelerators/accelerator_dispatcher.cc
+++ b/ash/accelerators/nested_accelerator_delegate.cc
@@ -1,8 +1,8 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// 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/nested_accelerator_delegate.h"
#include "ash/accelerators/accelerator_controller.h"
#include "ash/shell.h"
@@ -35,21 +35,26 @@ bool IsPossibleAcceleratorNotForMenu(const ui::KeyEvent& key_event) {
} // namespace
-bool AcceleratorDispatcher::MenuClosedForPossibleAccelerator(
+NestedAcceleratorDelegate::NestedAcceleratorDelegate() {
+}
+
+NestedAcceleratorDelegate::~NestedAcceleratorDelegate() {
+}
+
+bool NestedAcceleratorDelegate::ShouldProcessEventNow(
const ui::KeyEvent& key_event) {
if (!IsPossibleAcceleratorNotForMenu(key_event))
- return false;
+ return true;
if (views::MenuController* menu_controller =
views::MenuController::GetActiveInstance()) {
menu_controller->CancelAll();
- return true;
+ return false;
}
- return false;
+ return true;
}
-bool AcceleratorDispatcher::AcceleratorProcessedForKeyEvent(
- const ui::KeyEvent& key_event) {
+bool NestedAcceleratorDelegate::ProcessEvent(const ui::KeyEvent& key_event) {
ash::AcceleratorController* accelerator_controller =
ash::Shell::GetInstance()->accelerator_controller();
if (!accelerator_controller)
« no previous file with comments | « ash/accelerators/nested_accelerator_delegate.h ('k') | ash/accelerators/nested_dispatcher_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698