Chromium Code Reviews| Index: ui/base/accelerators/accelerator_manager.h |
| diff --git a/ui/base/accelerators/accelerator_manager.h b/ui/base/accelerators/accelerator_manager.h |
| index 9db9629fd8ecc8a9aabf7fa974fe15f1af2cdd75..e68dcfe161f1cc092642d656ee9c5b16808cb655 100644 |
| --- a/ui/base/accelerators/accelerator_manager.h |
| +++ b/ui/base/accelerators/accelerator_manager.h |
| @@ -8,6 +8,7 @@ |
| #include <list> |
| #include <map> |
| #include <utility> |
| +#include <vector> |
| #include "base/macros.h" |
| #include "ui/base/accelerators/accelerator.h" |
| @@ -30,10 +31,10 @@ class UI_BASE_EXPORT AcceleratorManager { |
| explicit AcceleratorManager(AcceleratorManagerDelegate* = nullptr); |
| ~AcceleratorManager(); |
| - // Register a keyboard accelerator for the specified target. If multiple |
| + // Register keyboard accelerators for the specified target. If multiple |
| // targets are registered for an accelerator, a target registered later has |
| // higher priority. |
| - // |accelerator| is the accelerator to register. |
| + // |accelerators| contains accelerators to register. |
| // |priority| denotes the priority of the handler. |
| // NOTE: In almost all cases, you should specify kNormalPriority for this |
| // parameter. Setting it to kHighPriority prevents Chrome from sending the |
| @@ -47,10 +48,16 @@ class UI_BASE_EXPORT AcceleratorManager { |
| // - the enter key |
| // - any F key (F1, F2, F3 ...) |
| // - any browser specific keys (as available on special keyboards) |
| - void Register(const Accelerator& accelerator, |
| + void Register(const std::vector<ui::Accelerator>& accelerators, |
| HandlerPriority priority, |
| AcceleratorTarget* target); |
| + // Register a keyboard accelerator for the specified target. This function |
|
sky
2017/01/30 17:13:31
Register->Registers
thanhph1
2017/01/30 17:45:12
Done.
|
| + // calls the function Register with vector argument above. |
|
sky
2017/01/30 17:13:31
It's fairly common when referring to functions in
thanhph1
2017/01/30 17:45:12
Done, thanks!
|
| + inline void RegisterAccelerator(const Accelerator& accelerator, |
|
sky
2017/01/30 17:13:31
Put the implementation here too.
thanhph1
2017/01/30 17:45:12
Done.
|
| + HandlerPriority priority, |
| + AcceleratorTarget* target); |
| + |
| // Unregister the specified keyboard accelerator for the specified target. |
| void Unregister(const Accelerator& accelerator, AcceleratorTarget* target); |