1 // Copyright 2014 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.
5 #include "chrome/browser/chromeos/input_method/mock_input_method_engine.h"
11 MockInputMethodEngine::MockInputMethodEngine(
12 const input_method::InputMethodDescriptor& descriptor)
13 : descriptor_(descriptor) {}
15 MockInputMethodEngine::~MockInputMethodEngine() {}
17 const input_method::InputMethodDescriptor&
18 MockInputMethodEngine::GetDescriptor() const {
22 void MockInputMethodEngine::NotifyImeReady() {
25 bool MockInputMethodEngine::SetComposition(
31 const std::vector<SegmentInfo>& segments,
36 bool MockInputMethodEngine::ClearComposition(int context_id,
41 bool MockInputMethodEngine::CommitText(int context_id,
47 bool MockInputMethodEngine::SendKeyEvents(
49 const std::vector<KeyboardEvent>& events) {
53 const MockInputMethodEngine::CandidateWindowProperty&
54 MockInputMethodEngine::GetCandidateWindowProperty() const {
55 return candidate_window_property_;
58 void MockInputMethodEngine::SetCandidateWindowProperty(
59 const CandidateWindowProperty& property) {
62 bool MockInputMethodEngine::SetCandidateWindowVisible(bool visible,
67 bool MockInputMethodEngine::SetCandidates(
69 const std::vector<Candidate>& candidates,
74 bool MockInputMethodEngine::SetCursorPosition(int context_id,
80 bool MockInputMethodEngine::SetMenuItems(const std::vector<MenuItem>& items) {
84 bool MockInputMethodEngine::UpdateMenuItems(
85 const std::vector<MenuItem>& items) {
89 bool MockInputMethodEngine::IsActive() const {
93 bool MockInputMethodEngine::DeleteSurroundingText(int context_id,
95 size_t number_of_chars,
100 void MockInputMethodEngine::HideInputView() {
103 void MockInputMethodEngine::FocusIn(
104 const IMEEngineHandlerInterface::InputContext& input_context) {
107 void MockInputMethodEngine::FocusOut() {
110 void MockInputMethodEngine::Enable() {
113 void MockInputMethodEngine::Disable() {
116 void MockInputMethodEngine::PropertyActivate(const std::string& property_name) {
117 last_activated_property_ = property_name;
120 void MockInputMethodEngine::Reset() {
123 void MockInputMethodEngine::ProcessKeyEvent(
124 const ui::KeyEvent& key_event,
125 const KeyEventDoneCallback& callback) {
128 void MockInputMethodEngine::CandidateClicked(uint32 index) {
131 void MockInputMethodEngine::SetSurroundingText(const std::string& text,
136 } // namespace chromeos