- add sources.
[platform/framework/web/crosswalk.git] / src / chromeos / ime / mock_xkeyboard.h
1 // Copyright 2013 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_MOCK_XKEYBOARD_H_
6 #define CHROMEOS_IME_MOCK_XKEYBOARD_H_
7
8 #include "chromeos/ime/xkeyboard.h"
9
10 #include <string>
11
12 #include "base/compiler_specific.h"
13
14 namespace chromeos {
15 namespace input_method {
16
17 class MockXKeyboard : public XKeyboard {
18  public:
19   MockXKeyboard();
20   virtual ~MockXKeyboard() {}
21
22   virtual bool SetCurrentKeyboardLayoutByName(
23       const std::string& layout_name) OVERRIDE;
24   virtual bool ReapplyCurrentKeyboardLayout() OVERRIDE;
25   virtual void ReapplyCurrentModifierLockStatus() OVERRIDE;
26   virtual void SetLockedModifiers(
27       ModifierLockStatus new_caps_lock_status,
28       ModifierLockStatus new_num_lock_status) OVERRIDE;
29   virtual void SetNumLockEnabled(bool enable_num_lock) OVERRIDE;
30   virtual void SetCapsLockEnabled(bool enable_caps_lock) OVERRIDE;
31   virtual bool NumLockIsEnabled() OVERRIDE;
32   virtual bool CapsLockIsEnabled() OVERRIDE;
33   virtual unsigned int GetNumLockMask() OVERRIDE;
34   virtual void GetLockedModifiers(bool* out_caps_lock_enabled,
35                                   bool* out_num_lock_enabled) OVERRIDE;
36
37   int set_current_keyboard_layout_by_name_count_;
38   std::string last_layout_;
39   bool caps_lock_is_enabled_;
40   bool num_lock_is_enabled_;
41   // TODO(yusukes): Add more variables for counting the numbers of the API calls
42
43  private:
44   DISALLOW_COPY_AND_ASSIGN(MockXKeyboard);
45 };
46
47 }  // namespace input_method
48 }  // namespace chromeos
49
50 #endif  // CHROMEOS_IME_MOCK_XKEYBOARD_H_