OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "ui/base/ime/remote_input_method_win.h" | 5 #include "ui/base/ime/remote_input_method_win.h" |
6 | 6 |
7 #include <InputScope.h> | 7 #include <InputScope.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 virtual void OnBlur() OVERRIDE { | 250 virtual void OnBlur() OVERRIDE { |
251 } | 251 } |
252 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE { | 252 virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE { |
253 } | 253 } |
254 virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE { | 254 virtual void OnTextInputStateChanged(const TextInputClient* client) OVERRIDE { |
255 ++on_text_input_state_changed_; | 255 ++on_text_input_state_changed_; |
256 } | 256 } |
257 virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE { | 257 virtual void OnInputMethodDestroyed(const InputMethod* client) OVERRIDE { |
258 ++on_input_method_destroyed_changed_; | 258 ++on_input_method_destroyed_changed_; |
259 } | 259 } |
| 260 virtual void OnShowImeIfNeeded() { |
| 261 } |
260 | 262 |
261 size_t on_text_input_state_changed_; | 263 size_t on_text_input_state_changed_; |
262 size_t on_input_method_destroyed_changed_; | 264 size_t on_input_method_destroyed_changed_; |
263 DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver); | 265 DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver); |
264 }; | 266 }; |
265 | 267 |
266 typedef ScopedObserver<InputMethod, InputMethodObserver> | 268 typedef ScopedObserver<InputMethod, InputMethodObserver> |
267 InputMethodScopedObserver; | 269 InputMethodScopedObserver; |
268 | 270 |
269 TEST(RemoteInputMethodWinTest, RemoteInputMethodPrivateWin) { | 271 TEST(RemoteInputMethodWinTest, RemoteInputMethodPrivateWin) { |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 scoped_ptr<InputMethod> input_method(CreateRemoteInputMethodWin(&delegate_)); | 844 scoped_ptr<InputMethod> input_method(CreateRemoteInputMethodWin(&delegate_)); |
843 input_method->AddObserver(&input_method_observer); | 845 input_method->AddObserver(&input_method_observer); |
844 | 846 |
845 EXPECT_EQ(0u, input_method_observer.on_input_method_destroyed_changed()); | 847 EXPECT_EQ(0u, input_method_observer.on_input_method_destroyed_changed()); |
846 input_method.reset(); | 848 input_method.reset(); |
847 EXPECT_EQ(1u, input_method_observer.on_input_method_destroyed_changed()); | 849 EXPECT_EQ(1u, input_method_observer.on_input_method_destroyed_changed()); |
848 } | 850 } |
849 | 851 |
850 } // namespace | 852 } // namespace |
851 } // namespace ui | 853 } // namespace ui |
OLD | NEW |