OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 | 10 |
11 typedef union _XEvent XEvent; | 11 typedef union _XEvent XEvent; |
12 | 12 |
13 namespace chromeos { | 13 namespace chromeos { |
14 | 14 |
15 class SystemKeyEventListener : public MessageLoopForUI::Observer { | 15 class SystemKeyEventListener : public base::MessageLoopForUI::Observer { |
16 public: | 16 public: |
17 // Observer for caps lock state changes. | 17 // Observer for caps lock state changes. |
18 class CapsLockObserver { | 18 class CapsLockObserver { |
19 public: | 19 public: |
20 virtual void OnCapsLockChange(bool enabled) = 0; | 20 virtual void OnCapsLockChange(bool enabled) = 0; |
21 | 21 |
22 protected: | 22 protected: |
23 CapsLockObserver() {} | 23 CapsLockObserver() {} |
24 virtual ~CapsLockObserver() {} | 24 virtual ~CapsLockObserver() {} |
25 | 25 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 // Base X ID for events from the XKB extension. | 89 // Base X ID for events from the XKB extension. |
90 int xkb_event_base_; | 90 int xkb_event_base_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(SystemKeyEventListener); | 92 DISALLOW_COPY_AND_ASSIGN(SystemKeyEventListener); |
93 }; | 93 }; |
94 | 94 |
95 } // namespace chromeos | 95 } // namespace chromeos |
96 | 96 |
97 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_ | 97 #endif // CHROME_BROWSER_CHROMEOS_SYSTEM_KEY_EVENT_LISTENER_H_ |
OLD | NEW |