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/gtest_prod_util.h" | 7 #include "base/gtest_prod_util.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 } | 136 } |
137 ~MockInputMethodBase() override {} | 137 ~MockInputMethodBase() override {} |
138 | 138 |
139 private: | 139 private: |
140 // Overriden from InputMethod. | 140 // Overriden from InputMethod. |
141 bool OnUntranslatedIMEMessage( | 141 bool OnUntranslatedIMEMessage( |
142 const base::NativeEvent& event, | 142 const base::NativeEvent& event, |
143 InputMethod::NativeEventResult* result) override { | 143 InputMethod::NativeEventResult* result) override { |
144 return false; | 144 return false; |
145 } | 145 } |
146 bool DispatchKeyEvent(const ui::KeyEvent&) override { return false; } | 146 void DispatchKeyEvent(ui::KeyEvent*) override {} |
147 void OnCaretBoundsChanged(const TextInputClient* client) override {} | 147 void OnCaretBoundsChanged(const TextInputClient* client) override {} |
148 void CancelComposition(const TextInputClient* client) override {} | 148 void CancelComposition(const TextInputClient* client) override {} |
149 void OnInputLocaleChanged() override {} | 149 void OnInputLocaleChanged() override {} |
150 std::string GetInputLocale() override { return ""; } | 150 std::string GetInputLocale() override { return ""; } |
151 bool IsCandidatePopupOpen() const override { return false; } | 151 bool IsCandidatePopupOpen() const override { return false; } |
152 // Overriden from InputMethodBase. | 152 // Overriden from InputMethodBase. |
153 void OnWillChangeFocusedClient(TextInputClient* focused_before, | 153 void OnWillChangeFocusedClient(TextInputClient* focused_before, |
154 TextInputClient* focused) override { | 154 TextInputClient* focused) override { |
155 verifier_->OnWillChangeFocusedClient(focused_before, focused); | 155 verifier_->OnWillChangeFocusedClient(focused_before, focused); |
156 } | 156 } |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 input_method.OnFocus(); | 294 input_method.OnFocus(); |
295 verifier.ExpectClientChange(&text_input_client, NULL); | 295 verifier.ExpectClientChange(&text_input_client, NULL); |
296 input_method.DetachTextInputClient(&text_input_client); | 296 input_method.DetachTextInputClient(&text_input_client); |
297 EXPECT_EQ(NULL, input_method.GetTextInputClient()); | 297 EXPECT_EQ(NULL, input_method.GetTextInputClient()); |
298 verifier.Verify(); | 298 verifier.Verify(); |
299 } | 299 } |
300 } | 300 } |
301 | 301 |
302 } // namespace | 302 } // namespace |
303 } // namespace ui | 303 } // namespace ui |
OLD | NEW |