| 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_MOCK_INPUT_METHOD_H_ | 5 #ifndef UI_BASE_IME_MOCK_INPUT_METHOD_H_ |
| 6 #define UI_BASE_IME_MOCK_INPUT_METHOD_H_ | 6 #define UI_BASE_IME_MOCK_INPUT_METHOD_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public: | 27 public: |
| 28 class Observer : public InputMethodObserver { | 28 class Observer : public InputMethodObserver { |
| 29 public: | 29 public: |
| 30 virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0; | 30 virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0; |
| 31 virtual void OnFocus() = 0; | 31 virtual void OnFocus() = 0; |
| 32 virtual void OnBlur() = 0; | 32 virtual void OnBlur() = 0; |
| 33 virtual void OnCaretBoundsChanged(const TextInputClient* client) = 0; | 33 virtual void OnCaretBoundsChanged(const TextInputClient* client) = 0; |
| 34 | 34 |
| 35 // InputMethodObserver overrides | 35 // InputMethodObserver overrides |
| 36 virtual void OnTextInputStateChanged(const TextInputClient* client) = 0; | 36 virtual void OnTextInputStateChanged(const TextInputClient* client) = 0; |
| 37 virtual void OnInputMethodDestroyed(const InputMethod* input_method) = 0; |
| 37 }; | 38 }; |
| 38 explicit MockInputMethod(internal::InputMethodDelegate* delegate); | 39 explicit MockInputMethod(internal::InputMethodDelegate* delegate); |
| 39 virtual ~MockInputMethod(); | 40 virtual ~MockInputMethod(); |
| 40 | 41 |
| 41 // Overriden from InputMethod. | 42 // Overriden from InputMethod. |
| 42 virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE; | 43 virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE; |
| 43 virtual void Init(bool focused) OVERRIDE; | 44 virtual void Init(bool focused) OVERRIDE; |
| 44 virtual void OnFocus() OVERRIDE; | 45 virtual void OnFocus() OVERRIDE; |
| 45 virtual void OnBlur() OVERRIDE; | 46 virtual void OnBlur() OVERRIDE; |
| 46 virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE; | 47 virtual void SetFocusedTextInputClient(TextInputClient* client) OVERRIDE; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 61 private: | 62 private: |
| 62 TextInputClient* text_input_client_; | 63 TextInputClient* text_input_client_; |
| 63 ObserverList<Observer> observer_list_; | 64 ObserverList<Observer> observer_list_; |
| 64 | 65 |
| 65 DISALLOW_COPY_AND_ASSIGN(MockInputMethod); | 66 DISALLOW_COPY_AND_ASSIGN(MockInputMethod); |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 } // namespace ui | 69 } // namespace ui |
| 69 | 70 |
| 70 #endif // UI_BASE_IME_MOCK_INPUT_METHOD_H_ | 71 #endif // UI_BASE_IME_MOCK_INPUT_METHOD_H_ |
| OLD | NEW |