| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_H_ | 5 #ifndef UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_H_ |
| 6 #define UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_H_ | 6 #define UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "ui/base/accelerators/accelerator.h" | 13 #include "ui/base/accelerators/accelerator.h" |
| 14 #include "ui/base/ui_export.h" | 14 #include "ui/base/ui_base_export.h" |
| 15 #include "ui/events/event_constants.h" | 15 #include "ui/events/event_constants.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 | 18 |
| 19 // The AcceleratorManger is used to handle keyboard accelerators. | 19 // The AcceleratorManger is used to handle keyboard accelerators. |
| 20 class UI_EXPORT AcceleratorManager { | 20 class UI_BASE_EXPORT AcceleratorManager { |
| 21 public: | 21 public: |
| 22 enum HandlerPriority { | 22 enum HandlerPriority { |
| 23 kNormalPriority, | 23 kNormalPriority, |
| 24 kHighPriority, | 24 kHighPriority, |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 AcceleratorManager(); | 27 AcceleratorManager(); |
| 28 ~AcceleratorManager(); | 28 ~AcceleratorManager(); |
| 29 | 29 |
| 30 // Register a keyboard accelerator for the specified target. If multiple | 30 // Register a keyboard accelerator for the specified target. If multiple |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 typedef std::pair<bool, AcceleratorTargetList> AcceleratorTargets; | 78 typedef std::pair<bool, AcceleratorTargetList> AcceleratorTargets; |
| 79 typedef std::map<Accelerator, AcceleratorTargets> AcceleratorMap; | 79 typedef std::map<Accelerator, AcceleratorTargets> AcceleratorMap; |
| 80 AcceleratorMap accelerators_; | 80 AcceleratorMap accelerators_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(AcceleratorManager); | 82 DISALLOW_COPY_AND_ASSIGN(AcceleratorManager); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace ui | 85 } // namespace ui |
| 86 | 86 |
| 87 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_H_ | 87 #endif // UI_BASE_ACCELERATORS_ACCELERATOR_MANAGER_H_ |
| OLD | NEW |