OLD | NEW |
---|---|
(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_AURAX11_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_AURAX11_H_ | |
7 | |
8 #include "base/lazy_instance.h" | |
9 #include "chrome/browser/extensions/global_shortcut_listener.h" | |
10 | |
11 namespace extensions { | |
12 | |
13 // Linux-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 class GlobalShortcutListenerAuraX11 : public GlobalShortcutListener { | |
Yoyo Zhou
2013/10/03 22:08:50
Should there be a TODO to implement this class?
Finnur
2013/10/04 17:57:02
Done.
| |
17 public: | |
18 virtual ~GlobalShortcutListenerAuraX11(); | |
19 | |
20 virtual void StartListening() OVERRIDE; | |
21 virtual void StopListening() OVERRIDE; | |
22 | |
23 private: | |
24 friend struct base::DefaultLazyInstanceTraits<GlobalShortcutListenerAuraX11>; | |
25 | |
26 GlobalShortcutListenerAuraX11(); | |
27 | |
28 // Register an |accelerator| with the particular |observer|. | |
29 virtual void RegisterAccelerator( | |
30 const ui::Accelerator& accelerator, | |
31 GlobalShortcutListener::Observer* observer) OVERRIDE; | |
32 // Unregister an |accelerator| with the particular |observer|. | |
33 virtual void UnregisterAccelerator( | |
34 const ui::Accelerator& accelerator, | |
35 GlobalShortcutListener::Observer* observer) OVERRIDE; | |
36 | |
37 // Whether this object is listening for global shortcuts. | |
38 bool is_listening_; | |
39 | |
40 DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListenerAuraX11); | |
41 }; | |
42 | |
43 } // namespace extensions | |
44 | |
45 #endif // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_AURAX11_H_ | |
OLD | NEW |