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/chromeos/mock_ime_engine_handler.h" | 5 #include "ui/base/ime/chromeos/mock_ime_engine_handler.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 MockIMEEngineHandler::MockIMEEngineHandler() | 9 MockIMEEngineHandler::MockIMEEngineHandler() |
10 : focus_in_call_count_(0), | 10 : focus_in_call_count_(0), |
(...skipping 15 matching lines...) Expand all Loading... | |
26 if (last_text_input_context_.type != ui::TEXT_INPUT_TYPE_NONE) | 26 if (last_text_input_context_.type != ui::TEXT_INPUT_TYPE_NONE) |
27 ++focus_in_call_count_; | 27 ++focus_in_call_count_; |
28 } | 28 } |
29 | 29 |
30 void MockIMEEngineHandler::FocusOut() { | 30 void MockIMEEngineHandler::FocusOut() { |
31 if (last_text_input_context_.type != ui::TEXT_INPUT_TYPE_NONE) | 31 if (last_text_input_context_.type != ui::TEXT_INPUT_TYPE_NONE) |
32 ++focus_out_call_count_; | 32 ++focus_out_call_count_; |
33 last_text_input_context_.type = ui::TEXT_INPUT_TYPE_NONE; | 33 last_text_input_context_.type = ui::TEXT_INPUT_TYPE_NONE; |
34 } | 34 } |
35 | 35 |
36 void MockIMEEngineHandler::Enable() { | 36 void MockIMEEngineHandler::Enable(const std::string& engine_id) { |
Yuki
2014/08/06 04:42:24
s/engine_id/component_id/
Shu Chen
2014/08/06 05:45:04
Done.
| |
37 } | 37 } |
38 | 38 |
39 void MockIMEEngineHandler::Disable() { | 39 void MockIMEEngineHandler::Disable() { |
40 } | 40 } |
41 | 41 |
42 void MockIMEEngineHandler::PropertyActivate(const std::string& property_name) { | 42 void MockIMEEngineHandler::PropertyActivate(const std::string& property_name) { |
43 last_activated_property_ = property_name; | 43 last_activated_property_ = property_name; |
44 } | 44 } |
45 | 45 |
46 void MockIMEEngineHandler::Reset() { | 46 void MockIMEEngineHandler::Reset() { |
(...skipping 14 matching lines...) Expand all Loading... | |
61 void MockIMEEngineHandler::SetSurroundingText(const std::string& text, | 61 void MockIMEEngineHandler::SetSurroundingText(const std::string& text, |
62 uint32 cursor_pos, | 62 uint32 cursor_pos, |
63 uint32 anchor_pos) { | 63 uint32 anchor_pos) { |
64 ++set_surrounding_text_call_count_; | 64 ++set_surrounding_text_call_count_; |
65 last_set_surrounding_text_ = text; | 65 last_set_surrounding_text_ = text; |
66 last_set_surrounding_cursor_pos_ = cursor_pos; | 66 last_set_surrounding_cursor_pos_ = cursor_pos; |
67 last_set_surrounding_anchor_pos_ = anchor_pos; | 67 last_set_surrounding_anchor_pos_ = anchor_pos; |
68 } | 68 } |
69 | 69 |
70 } // namespace chromeos | 70 } // namespace chromeos |
OLD | NEW |