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

Side by Side Diff: chromeos/ime/fake_xkeyboard.h

Issue 189663009: cros: Simplify chromeos::input_method::XKeyboard interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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
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_XKEYBOARD_H_
6 #define CHROMEOS_IME_FAKE_XKEYBOARD_H_ 6 #define CHROMEOS_IME_FAKE_XKEYBOARD_H_
7 7
8 #include "chromeos/ime/xkeyboard.h" 8 #include "chromeos/ime/xkeyboard.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 FakeXKeyboard : public XKeyboard {
19 public: 19 public:
20 FakeXKeyboard(); 20 FakeXKeyboard();
21 virtual ~FakeXKeyboard() {} 21 virtual ~FakeXKeyboard() {}
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 SetLockedModifiers(ModifierLockStatus new_caps_lock_status, 27 virtual void DisableNumLock() OVERRIDE;
28 ModifierLockStatus new_num_lock_status)
29 OVERRIDE;
30 virtual void SetNumLockEnabled(bool enable_num_lock) OVERRIDE;
31 virtual void SetCapsLockEnabled(bool enable_caps_lock) OVERRIDE; 28 virtual void SetCapsLockEnabled(bool enable_caps_lock) OVERRIDE;
32 virtual bool NumLockIsEnabled() OVERRIDE;
33 virtual bool CapsLockIsEnabled() OVERRIDE; 29 virtual bool CapsLockIsEnabled() OVERRIDE;
34 virtual unsigned int GetNumLockMask() OVERRIDE;
35 virtual void GetLockedModifiers(bool* out_caps_lock_enabled,
36 bool* out_num_lock_enabled) OVERRIDE;
37 virtual bool SetAutoRepeatEnabled(bool enabled) OVERRIDE; 30 virtual bool SetAutoRepeatEnabled(bool enabled) OVERRIDE;
38 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) OVERRIDE; 31 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) OVERRIDE;
39 32
40 int set_current_keyboard_layout_by_name_count_; 33 int set_current_keyboard_layout_by_name_count_;
41 std::string last_layout_; 34 std::string last_layout_;
42 bool caps_lock_is_enabled_; 35 bool caps_lock_is_enabled_;
43 bool num_lock_is_enabled_;
44 bool auto_repeat_is_enabled_; 36 bool auto_repeat_is_enabled_;
45 AutoRepeatRate last_auto_repeat_rate_; 37 AutoRepeatRate last_auto_repeat_rate_;
46 // TODO(yusukes): Add more variables for counting the numbers of the API calls 38 // TODO(yusukes): Add more variables for counting the numbers of the API calls
47 39
48 private: 40 private:
49 DISALLOW_COPY_AND_ASSIGN(FakeXKeyboard); 41 DISALLOW_COPY_AND_ASSIGN(FakeXKeyboard);
50 }; 42 };
51 43
52 } // namespace input_method 44 } // namespace input_method
53 } // namespace chromeos 45 } // namespace chromeos
54 46
55 #endif // CHROMEOS_IME_FAKE_XKEYBOARD_H_ 47 #endif // CHROMEOS_IME_FAKE_XKEYBOARD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698