OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 UI_BASE_TEST_DUMMY_INPUT_METHOD_H_ | |
6 #define UI_BASE_TEST_DUMMY_INPUT_METHOD_H_ | |
7 | |
8 #include "ui/base/ime/input_method.h" | |
9 | |
10 namespace ui { | |
11 | |
12 class InputMethodObserver; | |
13 | |
14 namespace test { | |
15 | |
16 class DummyInputMethod : public InputMethod { | |
17 public: | |
18 DummyInputMethod(); | |
19 virtual ~DummyInputMethod(); | |
20 | |
21 // InputMethod overrides: | |
22 virtual void SetDelegate( | |
23 internal::InputMethodDelegate* delegate) OVERRIDE; | |
24 virtual void Init(bool focused) OVERRIDE; | |
25 virtual void OnFocus() OVERRIDE; | |
26 virtual void OnBlur() OVERRIDE; | |
27 virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE; | |
28 virtual TextInputClient* GetTextInputClient() const OVERRIDE; | |
29 virtual bool DispatchKeyEvent(const base::NativeEvent& event) OVERRIDE; | |
30 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent& event) OVERRIDE; | |
31 virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE; | |
32 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE; | |
33 virtual void CancelComposition(const TextInputClient* client) OVERRIDE; | |
34 virtual std::string GetInputLocale() OVERRIDE; | |
35 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; | |
36 virtual bool IsActive() OVERRIDE; | |
37 virtual TextInputType GetTextInputType() const OVERRIDE; | |
38 virtual bool CanComposeInline() const OVERRIDE; | |
39 virtual void AddObserver(InputMethodObserver* observer) OVERRIDE; | |
40 virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE; | |
41 | |
42 private: | |
43 DISALLOW_COPY_AND_ASSIGN(DummyInputMethod); | |
44 }; | |
45 | |
46 } // namespace test | |
47 } // namespace ui | |
48 | |
49 #endif // UI_BASE_TEST_DUMMY_INPUT_METHOD_H_ | |
50 | |
OLD | NEW |