| Index: chrome/browser/extensions/global_shortcut_listener_mac.h
|
| ===================================================================
|
| --- chrome/browser/extensions/global_shortcut_listener_mac.h (revision 232310)
|
| +++ chrome/browser/extensions/global_shortcut_listener_mac.h (working copy)
|
| @@ -5,9 +5,17 @@
|
| #ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_MAC_H_
|
| #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_MAC_H_
|
|
|
| -#include "base/lazy_instance.h"
|
| #include "chrome/browser/extensions/global_shortcut_listener.h"
|
|
|
| +#include <set>
|
| +#include <IOKit/hidsystem/ev_keymap.h>
|
| +
|
| +#include "ApplicationServices/ApplicationServices.h"
|
| +#include "base/lazy_instance.h"
|
| +#include "base/mac/scoped_nsobject.h"
|
| +
|
| +@class GlobalShortcutListenerTap;
|
| +
|
| namespace extensions {
|
|
|
| // Mac-specific implementation of the GlobalShortcutListener class that
|
| @@ -21,6 +29,11 @@
|
| virtual void StartListening() OVERRIDE;
|
| virtual void StopListening() OVERRIDE;
|
|
|
| + // Keyboard event callbacks.
|
| + bool OnKeyEvent(ui::KeyboardCode keyCode, int modifiers);
|
| + bool OnMediaKeyEvent(ui::KeyboardCode keyCode);
|
| +
|
| +
|
| private:
|
| friend struct base::DefaultLazyInstanceTraits<GlobalShortcutListenerMac>;
|
|
|
| @@ -38,6 +51,13 @@
|
| // Whether this object is listening for global shortcuts.
|
| bool is_listening_;
|
|
|
| + // Set of registered accelerators.
|
| + typedef std::set<ui::Accelerator> RegisteredHotKeys;
|
| + RegisteredHotKeys registered_hot_keys_;
|
| +
|
| + // A pointer to the global shortcut listener tap.
|
| + base::scoped_nsobject<GlobalShortcutListenerTap> tap_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerMac);
|
| };
|
|
|
|
|