OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 UI_BASE_IME_FAKE_INPUT_METHOD_H_ | 5 #ifndef UI_BASE_IME_FAKE_INPUT_METHOD_H_ |
6 #define UI_BASE_IME_FAKE_INPUT_METHOD_H_ | 6 #define UI_BASE_IME_FAKE_INPUT_METHOD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/observer_list.h" |
12 #include "ui/base/ime/input_method.h" | 13 #include "ui/base/ime/input_method.h" |
| 14 #include "ui/base/ime/input_method_observer.h" |
13 #include "ui/base/ui_export.h" | 15 #include "ui/base/ui_export.h" |
14 | 16 |
15 namespace ui { | 17 namespace ui { |
16 | 18 |
17 class InputMethodObserver; | 19 class InputMethodObserver; |
18 class KeyEvent; | 20 class KeyEvent; |
19 class TextInputClient; | 21 class TextInputClient; |
20 | 22 |
21 // A fake ui::InputMethod implementation for minimum input support. | 23 // A fake ui::InputMethod implementation for minimum input support. |
22 class UI_EXPORT FakeInputMethod : NON_EXPORTED_BASE(public InputMethod) { | 24 class UI_EXPORT FakeInputMethod : NON_EXPORTED_BASE(public InputMethod) { |
(...skipping 17 matching lines...) Expand all Loading... |
40 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; | 42 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; |
41 virtual bool IsActive() OVERRIDE; | 43 virtual bool IsActive() OVERRIDE; |
42 virtual ui::TextInputType GetTextInputType() const OVERRIDE; | 44 virtual ui::TextInputType GetTextInputType() const OVERRIDE; |
43 virtual bool CanComposeInline() const OVERRIDE; | 45 virtual bool CanComposeInline() const OVERRIDE; |
44 virtual void AddObserver(InputMethodObserver* observer) OVERRIDE; | 46 virtual void AddObserver(InputMethodObserver* observer) OVERRIDE; |
45 virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE; | 47 virtual void RemoveObserver(InputMethodObserver* observer) OVERRIDE; |
46 | 48 |
47 private: | 49 private: |
48 internal::InputMethodDelegate* delegate_; | 50 internal::InputMethodDelegate* delegate_; |
49 TextInputClient* text_input_client_; | 51 TextInputClient* text_input_client_; |
| 52 ObserverList<InputMethodObserver> observers_; |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(FakeInputMethod); | 54 DISALLOW_COPY_AND_ASSIGN(FakeInputMethod); |
52 }; | 55 }; |
53 | 56 |
54 } // namespace ui | 57 } // namespace ui |
55 | 58 |
56 #endif // UI_BASE_IME_FAKE_INPUT_METHOD_H_ | 59 #endif // UI_BASE_IME_FAKE_INPUT_METHOD_H_ |
OLD | NEW |