Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / chromeos / ime / fake_xkeyboard.h
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.
4
5 #ifndef CHROMEOS_IME_FAKE_XKEYBOARD_H_
6 #define CHROMEOS_IME_FAKE_XKEYBOARD_H_
7
8 #include "chromeos/ime/xkeyboard.h"
9
10 #include <string>
11
12 #include "base/compiler_specific.h"
13 #include "chromeos/chromeos_export.h"
14
15 namespace chromeos {
16 namespace input_method {
17
18 class CHROMEOS_EXPORT FakeXKeyboard : public XKeyboard {
19  public:
20   FakeXKeyboard();
21   virtual ~FakeXKeyboard() {}
22
23   virtual void AddObserver(Observer* observer) OVERRIDE;
24   virtual void RemoveObserver(Observer* observer) OVERRIDE;
25   virtual bool SetCurrentKeyboardLayoutByName(const std::string& layout_name)
26       OVERRIDE;
27   virtual bool ReapplyCurrentKeyboardLayout() OVERRIDE;
28   virtual void ReapplyCurrentModifierLockStatus() OVERRIDE;
29   virtual void DisableNumLock() OVERRIDE;
30   virtual void SetCapsLockEnabled(bool enable_caps_lock) OVERRIDE;
31   virtual bool CapsLockIsEnabled() OVERRIDE;
32   virtual bool IsISOLevel5ShiftAvailable() const OVERRIDE;
33   virtual bool IsAltGrAvailable() const OVERRIDE;
34   virtual bool SetAutoRepeatEnabled(bool enabled) OVERRIDE;
35   virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) OVERRIDE;
36
37   int set_current_keyboard_layout_by_name_count_;
38   std::string last_layout_;
39   bool caps_lock_is_enabled_;
40   bool auto_repeat_is_enabled_;
41   AutoRepeatRate last_auto_repeat_rate_;
42   // TODO(yusukes): Add more variables for counting the numbers of the API calls
43
44  private:
45   DISALLOW_COPY_AND_ASSIGN(FakeXKeyboard);
46 };
47
48 }  // namespace input_method
49 }  // namespace chromeos
50
51 #endif  // CHROMEOS_IME_FAKE_XKEYBOARD_H_