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_UI_ASH_CAPS_LOCK_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ |
7 | 7 |
8 #include "ash/caps_lock_delegate.h" | 8 #include "ash/caps_lock_delegate.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #endif | 27 #endif |
28 { | 28 { |
29 public: | 29 public: |
30 CapsLockHandler() {} | 30 CapsLockHandler() {} |
31 #if defined(OS_CHROMEOS) | 31 #if defined(OS_CHROMEOS) |
32 explicit CapsLockHandler(chromeos::input_method::XKeyboard* xkeyboard); | 32 explicit CapsLockHandler(chromeos::input_method::XKeyboard* xkeyboard); |
33 #endif | 33 #endif |
34 virtual ~CapsLockHandler(); | 34 virtual ~CapsLockHandler(); |
35 | 35 |
36 // Overridden from ash::CapsLockHandler: | 36 // Overridden from ash::CapsLockHandler: |
37 virtual bool HandleToggleCapsLock() OVERRIDE; | 37 virtual bool IsCapsLockEnabled() const OVERRIDE; |
| 38 virtual void SetCapsLockEnabled(bool enabled) OVERRIDE; |
| 39 virtual void ToggleCapsLock() OVERRIDE; |
38 | 40 |
39 #if defined(OS_CHROMEOS) | 41 #if defined(OS_CHROMEOS) |
40 // Overridden from chromeos::SystemKeyEventListener::CapsLockObserver: | 42 // Overridden from chromeos::SystemKeyEventListener::CapsLockObserver: |
41 virtual void OnCapsLockChange(bool enabled) OVERRIDE; | 43 virtual void OnCapsLockChange(bool enabled) OVERRIDE; |
42 | 44 |
43 void set_is_running_on_chromeos_for_test(bool is_running_on_chromeos) { | 45 void set_is_running_on_chromeos_for_test(bool is_running_on_chromeos) { |
44 is_running_on_chromeos_ = is_running_on_chromeos; | 46 is_running_on_chromeos_ = is_running_on_chromeos; |
45 } | 47 } |
46 | 48 |
47 bool caps_lock_is_on_for_test() const { | 49 bool caps_lock_is_on_for_test() const { |
48 return caps_lock_is_on_; | 50 return caps_lock_is_on_; |
49 } | 51 } |
50 | 52 |
51 private: | 53 private: |
52 chromeos::input_method::XKeyboard* xkeyboard_; | 54 chromeos::input_method::XKeyboard* xkeyboard_; |
53 bool is_running_on_chromeos_; | 55 bool is_running_on_chromeos_; |
54 bool caps_lock_is_on_; | 56 bool caps_lock_is_on_; |
55 #endif | 57 #endif |
56 | 58 |
57 private: | 59 private: |
58 DISALLOW_COPY_AND_ASSIGN(CapsLockHandler); | 60 DISALLOW_COPY_AND_ASSIGN(CapsLockHandler); |
59 }; | 61 }; |
60 | 62 |
61 #endif // CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ | 63 #endif // CHROME_BROWSER_UI_ASH_CAPS_LOCK_HANDLER_H_ |
OLD | NEW |