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

Side by Side Diff: chrome/browser/extensions/global_shortcut_listener_mac.h

Issue 23812010: Implement first part of supporting global extension commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gclient sync Created 7 years, 2 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_MAC_H_
6 #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_MAC_H_
7
8 #include "base/lazy_instance.h"
9 #include "chrome/browser/extensions/global_shortcut_listener.h"
10
11 namespace extensions {
12
13 // Mac-specific implementation of the GlobalShortcutListener class that
14 // listens for global shortcuts. Handles basic keyboard intercepting and
15 // forwards its output to the base class for processing.
16 // TODO(finnur/smus): Implement this class.
17 class GlobalShortcutListenerMac : public GlobalShortcutListener {
18 public:
19 virtual ~GlobalShortcutListenerMac();
20
21 virtual void StartListening() OVERRIDE;
22 virtual void StopListening() OVERRIDE;
23
24 private:
25 friend struct base::DefaultLazyInstanceTraits<GlobalShortcutListenerMac>;
26
27 GlobalShortcutListenerMac();
28
29 // Register an |accelerator| with the particular |observer|.
30 virtual void RegisterAccelerator(
31 const ui::Accelerator& accelerator,
32 GlobalShortcutListener::Observer* observer) OVERRIDE;
33 // Unregister an |accelerator| with the particular |observer|.
34 virtual void UnregisterAccelerator(
35 const ui::Accelerator& accelerator,
36 GlobalShortcutListener::Observer* observer) OVERRIDE;
37
38 // Whether this object is listening for global shortcuts.
39 bool is_listening_;
40
41 DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerMac);
42 };
43
44 } // namespace extensions
45
46 #endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/global_shortcut_listener_gtk.cc ('k') | chrome/browser/extensions/global_shortcut_listener_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698