| 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_engine_handler.h" |
| 6 |
| 7 namespace chromeos { |
| 8 |
| 9 MockIMEEngineHandler::MockIMEEngineHandler() |
| 10 : focus_in_call_count_(0), |
| 11 focus_out_call_count_(0), |
| 12 set_surrounding_text_call_count_(0), |
| 13 process_key_event_call_count_(0), |
| 14 reset_call_count_(0), |
| 15 last_set_surrounding_cursor_pos_(0), |
| 16 last_set_surrounding_anchor_pos_(0), |
| 17 last_processed_keysym_(0), |
| 18 last_processed_keycode_(0), |
| 19 last_processed_state_(0) { |
| 20 } |
| 21 |
| 22 MockIMEEngineHandler::~MockIMEEngineHandler() { |
| 23 } |
| 24 |
| 25 void MockIMEEngineHandler::FocusIn() { |
| 26 ++focus_in_call_count_; |
| 27 } |
| 28 |
| 29 void MockIMEEngineHandler::FocusOut() { |
| 30 ++focus_out_call_count_; |
| 31 } |
| 32 |
| 33 void MockIMEEngineHandler::Enable() { |
| 34 } |
| 35 |
| 36 void MockIMEEngineHandler::Disable() { |
| 37 } |
| 38 |
| 39 void MockIMEEngineHandler::PropertyActivate( |
| 40 const std::string& property_name, |
| 41 ibus::IBusPropertyState property_state) { |
| 42 } |
| 43 |
| 44 void MockIMEEngineHandler::PropertyShow(const std::string& property_name) { |
| 45 } |
| 46 |
| 47 void MockIMEEngineHandler::PropertyHide(const std::string& property_name) { |
| 48 } |
| 49 |
| 50 void MockIMEEngineHandler::SetCapability(IBusCapability capability) { |
| 51 } |
| 52 |
| 53 void MockIMEEngineHandler::Reset() { |
| 54 ++reset_call_count_; |
| 55 } |
| 56 |
| 57 void MockIMEEngineHandler::ProcessKeyEvent( |
| 58 uint32 keysym, |
| 59 uint32 keycode, |
| 60 uint32 state, |
| 61 const KeyEventDoneCallback& callback) { |
| 62 ++process_key_event_call_count_; |
| 63 last_processed_keysym_ = keysym; |
| 64 last_processed_keycode_ = keycode; |
| 65 last_processed_state_ = state; |
| 66 last_passed_callback_ = callback; |
| 67 } |
| 68 |
| 69 void MockIMEEngineHandler::CandidateClicked(uint32 index, |
| 70 ibus::IBusMouseButton button, |
| 71 uint32 state) { |
| 72 } |
| 73 |
| 74 void MockIMEEngineHandler::SetSurroundingText(const std::string& text, |
| 75 uint32 cursor_pos, |
| 76 uint32 anchor_pos) { |
| 77 ++set_surrounding_text_call_count_; |
| 78 last_set_surrounding_text_ = text; |
| 79 last_set_surrounding_cursor_pos_ = cursor_pos; |
| 80 last_set_surrounding_anchor_pos_ = anchor_pos; |
| 81 } |
| 82 |
| 83 } // namespace chromeos |
| 84 |
| OLD | NEW |