| 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/input_method_base.h" | 5 #include "ui/base/ime/input_method_base.h" |
| 6 | 6 |
| 7 #include "base/scoped_observer.h" | 7 #include "base/scoped_observer.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "ui/base/ime/dummy_text_input_client.h" | 9 #include "ui/base/ime/dummy_text_input_client.h" |
| 10 #include "ui/base/ime/input_method_observer.h" | 10 #include "ui/base/ime/input_method_observer.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual ~SimpleMockInputMethodBase() { | 117 virtual ~SimpleMockInputMethodBase() { |
| 118 } | 118 } |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 // Overriden from InputMethod. | 121 // Overriden from InputMethod. |
| 122 virtual bool OnUntranslatedIMEMessage( | 122 virtual bool OnUntranslatedIMEMessage( |
| 123 const base::NativeEvent& event, | 123 const base::NativeEvent& event, |
| 124 InputMethod::NativeEventResult* result) OVERRIDE { | 124 InputMethod::NativeEventResult* result) OVERRIDE { |
| 125 return false; | 125 return false; |
| 126 } | 126 } |
| 127 virtual bool DispatchKeyEvent(const base::NativeEvent&) OVERRIDE { | 127 virtual bool DispatchKeyEvent(const ui::KeyEvent&) OVERRIDE { |
| 128 return false; | 128 return false; |
| 129 } | 129 } |
| 130 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent&) OVERRIDE { | 130 virtual bool DispatchFabricatedKeyEvent(const ui::KeyEvent&) OVERRIDE { |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 virtual void CancelComposition(const TextInputClient* client) OVERRIDE { | 133 virtual void CancelComposition(const TextInputClient* client) OVERRIDE { |
| 134 } | 134 } |
| 135 virtual std::string GetInputLocale() OVERRIDE{ | 135 virtual std::string GetInputLocale() OVERRIDE{ |
| 136 return ""; | 136 return ""; |
| 137 } | 137 } |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 input_method.SetFocusedTextInputClient(&text_input_client); | 400 input_method.SetFocusedTextInputClient(&text_input_client); |
| 401 input_method_observer.Reset(); | 401 input_method_observer.Reset(); |
| 402 input_method.OnInputLocaleChanged(); | 402 input_method.OnInputLocaleChanged(); |
| 403 EXPECT_EQ(1u, input_method_observer.on_input_locale_changed()); | 403 EXPECT_EQ(1u, input_method_observer.on_input_locale_changed()); |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 | 406 |
| 407 } // namespace | 407 } // namespace |
| 408 } // namespace ui | 408 } // namespace ui |
| OLD | NEW |