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
3 // found in the LICENSE file.
5 #ifndef CHROMEOS_IME_FAKE_IME_KEYBOARD_H_
6 #define CHROMEOS_IME_FAKE_IME_KEYBOARD_H_
8 #include "chromeos/ime/ime_keyboard.h"
12 #include "base/compiler_specific.h"
13 #include "base/observer_list.h"
14 #include "chromeos/chromeos_export.h"
17 namespace input_method
{
19 class CHROMEOS_EXPORT FakeImeKeyboard
: public ImeKeyboard
{
22 virtual ~FakeImeKeyboard();
24 virtual void AddObserver(Observer
* observer
) OVERRIDE
;
25 virtual void RemoveObserver(Observer
* observer
) OVERRIDE
;
26 virtual bool SetCurrentKeyboardLayoutByName(const std::string
& layout_name
)
28 virtual bool ReapplyCurrentKeyboardLayout() OVERRIDE
;
29 virtual void ReapplyCurrentModifierLockStatus() OVERRIDE
;
30 virtual void DisableNumLock() OVERRIDE
;
31 virtual void SetCapsLockEnabled(bool enable_caps_lock
) OVERRIDE
;
32 virtual bool CapsLockIsEnabled() OVERRIDE
;
33 virtual bool IsISOLevel5ShiftAvailable() const OVERRIDE
;
34 virtual bool IsAltGrAvailable() const OVERRIDE
;
35 virtual bool SetAutoRepeatEnabled(bool enabled
) OVERRIDE
;
36 virtual bool SetAutoRepeatRate(const AutoRepeatRate
& rate
) OVERRIDE
;
38 int set_current_keyboard_layout_by_name_count_
;
39 std::string last_layout_
;
40 bool caps_lock_is_enabled_
;
41 bool auto_repeat_is_enabled_
;
42 AutoRepeatRate last_auto_repeat_rate_
;
43 // TODO(yusukes): Add more variables for counting the numbers of the API calls
46 ObserverList
<Observer
> observers_
;
48 DISALLOW_COPY_AND_ASSIGN(FakeImeKeyboard
);
51 } // namespace input_method
52 } // namespace chromeos
54 #endif // CHROMEOS_IME_FAKE_IME_KEYBOARD_H_