Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chromeos/ime/mock_ime_candidate_window_handler.h" | |
| 6 | |
| 7 namespace chromeos { | |
| 8 | |
| 9 MockIMECandidateWindowHandler::MockIMECandidateWindowHandler() | |
| 10 : set_cursor_location_call_count_(0), | |
| 11 update_lookup_table_call_count_(0), | |
| 12 update_auxiliary_text_call_count_(0) { | |
| 13 } | |
| 14 | |
| 15 MockIMECandidateWindowHandler::~MockIMECandidateWindowHandler() { | |
| 16 | |
| 17 } | |
| 18 | |
| 19 void MockIMECandidateWindowHandler::UpdateLookupTable( | |
| 20 const IBusLookupTable& table, | |
| 21 bool visible) { | |
| 22 ++update_lookup_table_call_count_; | |
| 23 last_update_lookup_table_arg_.lookup_table.CopyFrom(table); | |
| 24 last_update_lookup_table_arg_.is_visible = visible; | |
| 25 } | |
| 26 | |
| 27 void MockIMECandidateWindowHandler::HideLookupTable() { | |
| 28 } | |
| 29 | |
| 30 void MockIMECandidateWindowHandler::UpdateAuxiliaryText(const std::string& text, | |
| 31 bool visible) { | |
| 32 ++update_auxiliary_text_call_count_; | |
| 33 last_update_auxiliary_text_arg_.text = text; | |
| 34 last_update_auxiliary_text_arg_.is_visible = visible; | |
| 35 } | |
| 36 | |
| 37 void MockIMECandidateWindowHandler::HideAuxiliaryText() { | |
| 38 } | |
| 39 | |
| 40 void MockIMECandidateWindowHandler::UpdatePreeditText(const std::string& text, | |
| 41 uint32 cursor_pos, | |
| 42 bool visible) { | |
| 43 } | |
| 44 | |
| 45 void MockIMECandidateWindowHandler::HidePreeditText() { | |
| 46 } | |
| 47 | |
| 48 void MockIMECandidateWindowHandler::SetCursorLocation( | |
| 49 const ibus::Rect& cursor_location, | |
| 50 const ibus::Rect& composition_head) { | |
| 51 set_cursor_location_call_count_++; | |
|
satorux1
2013/09/02 01:45:40
nit: ++set_cursor_location_call_count_;
pre-incre
Seigo Nonaka
2013/09/02 03:03:10
Done.
| |
| 52 } | |
| 53 | |
| 54 void MockIMECandidateWindowHandler::Reset() { | |
| 55 set_cursor_location_call_count_ = 0; | |
| 56 update_lookup_table_call_count_ = 0; | |
| 57 update_auxiliary_text_call_count_ = 0; | |
| 58 } | |
| 59 | |
| 60 } // namespace chromeos | |
| OLD | NEW |