| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROMEOS_IME_FAKE_XKEYBOARD_H_ | 5 #ifndef CHROMEOS_IME_FAKE_KEYBOARD_CONTROLLER_H_ |
| 6 #define CHROMEOS_IME_FAKE_XKEYBOARD_H_ | 6 #define CHROMEOS_IME_FAKE_KEYBOARD_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "chromeos/ime/xkeyboard.h" | 8 #include "chromeos/ime/keyboard_controller.h" |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chromeos/chromeos_export.h" | 13 #include "chromeos/chromeos_export.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 namespace input_method { | 16 namespace input_method { |
| 17 | 17 |
| 18 class CHROMEOS_EXPORT FakeXKeyboard : public XKeyboard { | 18 class CHROMEOS_EXPORT FakeKeyboardController : public KeyboardController { |
| 19 public: | 19 public: |
| 20 FakeXKeyboard(); | 20 FakeKeyboardController(); |
| 21 virtual ~FakeXKeyboard() {} | 21 virtual ~FakeKeyboardController() {} |
| 22 | 22 |
| 23 virtual bool SetCurrentKeyboardLayoutByName(const std::string& layout_name) | 23 virtual bool SetCurrentKeyboardLayoutByName(const std::string& layout_name) |
| 24 OVERRIDE; | 24 OVERRIDE; |
| 25 virtual bool ReapplyCurrentKeyboardLayout() OVERRIDE; | 25 virtual bool ReapplyCurrentKeyboardLayout() OVERRIDE; |
| 26 virtual void ReapplyCurrentModifierLockStatus() OVERRIDE; | 26 virtual void ReapplyCurrentModifierLockStatus() OVERRIDE; |
| 27 virtual void DisableNumLock() OVERRIDE; | 27 virtual void DisableNumLock() OVERRIDE; |
| 28 virtual void SetCapsLockEnabled(bool enable_caps_lock) OVERRIDE; | 28 virtual void SetCapsLockEnabled(bool enable_caps_lock) OVERRIDE; |
| 29 virtual bool CapsLockIsEnabled() OVERRIDE; | 29 virtual bool CapsLockIsEnabled() OVERRIDE; |
| 30 virtual bool IsISOLevel5ShiftAvailable() const OVERRIDE; | 30 virtual bool IsISOLevel5ShiftAvailable() const OVERRIDE; |
| 31 virtual bool IsAltGrAvailable() const OVERRIDE; | 31 virtual bool IsAltGrAvailable() const OVERRIDE; |
| 32 virtual bool SetAutoRepeatEnabled(bool enabled) OVERRIDE; | 32 virtual bool SetAutoRepeatEnabled(bool enabled) OVERRIDE; |
| 33 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) OVERRIDE; | 33 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) OVERRIDE; |
| 34 | 34 |
| 35 int set_current_keyboard_layout_by_name_count_; | 35 int set_current_keyboard_layout_by_name_count_; |
| 36 std::string last_layout_; | 36 std::string last_layout_; |
| 37 bool caps_lock_is_enabled_; | 37 bool caps_lock_is_enabled_; |
| 38 bool auto_repeat_is_enabled_; | 38 bool auto_repeat_is_enabled_; |
| 39 AutoRepeatRate last_auto_repeat_rate_; | 39 AutoRepeatRate last_auto_repeat_rate_; |
| 40 // TODO(yusukes): Add more variables for counting the numbers of the API calls | 40 // TODO(yusukes): Add more variables for counting the numbers of the API calls |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(FakeXKeyboard); | 43 DISALLOW_COPY_AND_ASSIGN(FakeKeyboardController); |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 } // namespace input_method | 46 } // namespace input_method |
| 47 } // namespace chromeos | 47 } // namespace chromeos |
| 48 | 48 |
| 49 #endif // CHROMEOS_IME_FAKE_XKEYBOARD_H_ | 49 #endif // CHROMEOS_IME_FAKE_KEYBOARD_CONTROLLER_H_ |
| OLD | NEW |