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

Unified Diff: ui/base/accelerators/accelerator_manager.h

Issue 838253004: MacViews: Fix duplicate definition of ExtensionKeyBindingRegistry::SetShortcutHandlingSuspended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DragBookmarks2
Patch Set: Created 5 years, 11 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
Index: ui/base/accelerators/accelerator_manager.h
diff --git a/ui/base/accelerators/accelerator_manager.h b/ui/base/accelerators/accelerator_manager.h
index 8398c8f7404c2253e76fdb8cb63eac1a28bf9c1e..960ca560f137968b6b57706c7e03c46ce5e5aef5 100644
--- a/ui/base/accelerators/accelerator_manager.h
+++ b/ui/base/accelerators/accelerator_manager.h
@@ -1,4 +1,5 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+
sky 2015/01/08 23:39:26 fix this.
Andre 2015/01/09 00:06:15 Done.
+// // 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.
@@ -17,7 +18,7 @@
namespace ui {
// The AcceleratorManger is used to handle keyboard accelerators.
-class UI_BASE_EXPORT AcceleratorManager {
+class UI_BASE_EXPORT AcceleratorManager : public AcceleratorProcessor {
public:
enum HandlerPriority {
kNormalPriority,
@@ -25,7 +26,7 @@ class UI_BASE_EXPORT AcceleratorManager {
};
AcceleratorManager();
- ~AcceleratorManager();
+ ~AcceleratorManager() override;
// Register a keyboard accelerator for the specified target. If multiple
// targets are registered for an accelerator, a target registered later has
@@ -54,22 +55,14 @@ class UI_BASE_EXPORT AcceleratorManager {
// Unregister all keyboard accelerator for the specified target.
void UnregisterAll(AcceleratorTarget* target);
- // Activate the target associated with the specified accelerator.
- // First, AcceleratorPressed handler of the most recently registered target
- // is called, and if that handler processes the event (i.e. returns true),
- // this method immediately returns. If not, we do the same thing on the next
- // target, and so on.
- // Returns true if an accelerator was activated.
- bool Process(const Accelerator& accelerator);
-
- // Returns the AcceleratorTarget that should be activated for the specified
- // keyboard accelerator, or NULL if no view is registered for that keyboard
- // accelerator.
- AcceleratorTarget* GetCurrentTarget(const Accelerator& accelerator) const;
-
// Whether the given |accelerator| has a priority handler associated with it.
bool HasPriorityHandler(const Accelerator& accelerator) const;
+ // Overridden from AcceleratorProcessor:
+ bool ProcessAccelerator(const Accelerator& accelerator) override;
+ AcceleratorTarget* GetTargetForAccelerator(
+ const Accelerator& accelerator) const override;
+
private:
// The accelerators and associated targets.
typedef std::list<AcceleratorTarget*> AcceleratorTargetList;

Powered by Google App Engine
This is Rietveld 408576698