| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 void OnFocus() override {} | 236 void OnFocus() override {} |
| 237 void OnBlur() override {} | 237 void OnBlur() override {} |
| 238 void OnCaretBoundsChanged(const TextInputClient* client) override {} | 238 void OnCaretBoundsChanged(const TextInputClient* client) override {} |
| 239 void OnTextInputStateChanged(const TextInputClient* client) override { | 239 void OnTextInputStateChanged(const TextInputClient* client) override { |
| 240 ++on_text_input_state_changed_; | 240 ++on_text_input_state_changed_; |
| 241 } | 241 } |
| 242 void OnInputMethodDestroyed(const InputMethod* client) override { | 242 void OnInputMethodDestroyed(const InputMethod* client) override { |
| 243 ++on_input_method_destroyed_changed_; | 243 ++on_input_method_destroyed_changed_; |
| 244 } | 244 } |
| 245 void OnShowImeIfNeeded() override {} | 245 void OnShowImeIfNeeded() override {} |
| 246 void OnKeyboardBoundsUnchanged() override {} |
| 246 | 247 |
| 247 size_t on_text_input_state_changed_; | 248 size_t on_text_input_state_changed_; |
| 248 size_t on_input_method_destroyed_changed_; | 249 size_t on_input_method_destroyed_changed_; |
| 249 DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver); | 250 DISALLOW_COPY_AND_ASSIGN(MockInputMethodObserver); |
| 250 }; | 251 }; |
| 251 | 252 |
| 252 typedef ScopedObserver<InputMethod, InputMethodObserver> | 253 typedef ScopedObserver<InputMethod, InputMethodObserver> |
| 253 InputMethodScopedObserver; | 254 InputMethodScopedObserver; |
| 254 | 255 |
| 255 TEST(RemoteInputMethodWinTest, RemoteInputMethodPrivateWin) { | 256 TEST(RemoteInputMethodWinTest, RemoteInputMethodPrivateWin) { |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 scoped_ptr<InputMethod> input_method(CreateRemoteInputMethodWin(&delegate_)); | 828 scoped_ptr<InputMethod> input_method(CreateRemoteInputMethodWin(&delegate_)); |
| 828 input_method->AddObserver(&input_method_observer); | 829 input_method->AddObserver(&input_method_observer); |
| 829 | 830 |
| 830 EXPECT_EQ(0u, input_method_observer.on_input_method_destroyed_changed()); | 831 EXPECT_EQ(0u, input_method_observer.on_input_method_destroyed_changed()); |
| 831 input_method.reset(); | 832 input_method.reset(); |
| 832 EXPECT_EQ(1u, input_method_observer.on_input_method_destroyed_changed()); | 833 EXPECT_EQ(1u, input_method_observer.on_input_method_destroyed_changed()); |
| 833 } | 834 } |
| 834 | 835 |
| 835 } // namespace | 836 } // namespace |
| 836 } // namespace ui | 837 } // namespace ui |
| OLD | NEW |