| 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)
|
|
|