Make Accelerator a standalone JS type.
This makes menu and global-shortcut share the same code on accelerator.
This commit is contained in:
parent
28b9df24a6
commit
6dc01945af
9 changed files with 114 additions and 65 deletions
|
@ -34,9 +34,10 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
|||
private:
|
||||
typedef std::map<ui::Accelerator, base::Closure> AcceleratorCallbackMap;
|
||||
|
||||
bool Register(const std::string& keycode, const base::Closure& callback);
|
||||
bool IsRegistered(const std::string& keycode);
|
||||
void Unregister(const std::string& keycode);
|
||||
bool Register(const ui::Accelerator& accelerator,
|
||||
const base::Closure& callback);
|
||||
bool IsRegistered(const ui::Accelerator& accelerator);
|
||||
void Unregister(const ui::Accelerator& accelerator);
|
||||
void UnregisterAll();
|
||||
|
||||
// GlobalShortcutListener::Observer implementation.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue