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

Side by Side Diff: athena/input/public/accelerator_manager.h

Issue 322503005: Athena's FocusManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « athena/input/input_manager_impl.cc ('k') | athena/screen/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ATHENA_INPUT_PUBLIC_ACCELERATOR_MANAGER_H_ 5 #ifndef ATHENA_INPUT_PUBLIC_ACCELERATOR_MANAGER_H_
6 #define ATHENA_INPUT_PUBLIC_ACCELERATOR_MANAGER_H_ 6 #define ATHENA_INPUT_PUBLIC_ACCELERATOR_MANAGER_H_
7 7
8 #include "athena/athena_export.h" 8 #include "athena/athena_export.h"
9 #include "ui/events/keycodes/keyboard_codes.h" 9 #include "ui/events/keycodes/keyboard_codes.h"
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 public: 48 public:
49 virtual ~AcceleratorHandler() {} 49 virtual ~AcceleratorHandler() {}
50 50
51 virtual bool IsCommandEnabled(int command_id) const = 0; 51 virtual bool IsCommandEnabled(int command_id) const = 0;
52 virtual bool OnAcceleratorFired(int command_id, 52 virtual bool OnAcceleratorFired(int command_id,
53 const ui::Accelerator& accelerator) = 0; 53 const ui::Accelerator& accelerator) = 0;
54 }; 54 };
55 55
56 class AcceleratorManager { 56 class AcceleratorManager {
57 public: 57 public:
58 static AcceleratorManager* Get();
59
58 virtual ~AcceleratorManager() {} 60 virtual ~AcceleratorManager() {}
59 61
60 // Register accelerators and its handler that will be invoked when 62 // Register accelerators and its handler that will be invoked when
61 // one of accelerator is fired. 63 // one of accelerator is fired.
62 virtual void RegisterAccelerators(const AcceleratorData accelerators[], 64 virtual void RegisterAccelerators(const AcceleratorData accelerators[],
63 size_t num_accelerators, 65 size_t num_accelerators,
64 AcceleratorHandler* handler) = 0; 66 AcceleratorHandler* handler) = 0;
65 67
66 // Enables accelerators that has a AF_DEBUG flag. 68 // Enables/Disables accelerators that has a AF_DEBUG flag.
67 virtual void EnableDebugAccelerators() = 0; 69 virtual void SetDebugAcceleratorsEnabled(bool enabled) = 0;
68 }; 70 };
69 71
70 } // namespace athena 72 } // namespace athena
71 73
72 #endif // ATHENA_INPUT_PUBLIC_ACCELERATOR_MANAGER_H_ 74 #endif // ATHENA_INPUT_PUBLIC_ACCELERATOR_MANAGER_H_
OLDNEW
« no previous file with comments | « athena/input/input_manager_impl.cc ('k') | athena/screen/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698