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.
4
5#include "chrome/browser/chromeos/input_method/mock_input_method_engine.h"
6
7#include <map>
8
9namespace chromeos {
10
11MockInputMethodEngine::MockInputMethodEngine() {}
12
13MockInputMethodEngine::~MockInputMethodEngine() {}
14
15const std::string& MockInputMethodEngine::GetActiveComponentId() const {
16  return active_component_id_;
17}
18
19bool MockInputMethodEngine::SetComposition(
20    int context_id,
21    const char* text,
22    int selection_start,
23    int selection_end,
24    int cursor,
25    const std::vector<SegmentInfo>& segments,
26    std::string* error) {
27  return true;
28}
29
30bool MockInputMethodEngine::ClearComposition(int context_id,
31                                             std::string* error)  {
32  return true;
33}
34
35bool MockInputMethodEngine::CommitText(int context_id,
36                                       const char* text,
37                                       std::string* error) {
38  return true;
39}
40
41bool MockInputMethodEngine::SendKeyEvents(
42    int context_id,
43    const std::vector<KeyboardEvent>& events) {
44  return true;
45}
46
47const MockInputMethodEngine::CandidateWindowProperty&
48MockInputMethodEngine::GetCandidateWindowProperty() const {
49  return candidate_window_property_;
50}
51
52void MockInputMethodEngine::SetCandidateWindowProperty(
53    const CandidateWindowProperty& property) {
54}
55
56bool MockInputMethodEngine::SetCandidateWindowVisible(bool visible,
57                                                      std::string* error) {
58  return true;
59}
60
61bool MockInputMethodEngine::SetCandidates(
62    int context_id,
63    const std::vector<Candidate>& candidates,
64    std::string* error) {
65  return true;
66}
67
68bool MockInputMethodEngine::SetCursorPosition(int context_id,
69                                              int candidate_id,
70                                              std::string* error) {
71  return true;
72}
73
74bool MockInputMethodEngine::SetMenuItems(const std::vector<MenuItem>& items) {
75  return true;
76}
77
78bool MockInputMethodEngine::UpdateMenuItems(
79    const std::vector<MenuItem>& items) {
80  return true;
81}
82
83bool MockInputMethodEngine::IsActive() const {
84  return true;
85}
86
87bool MockInputMethodEngine::DeleteSurroundingText(int context_id,
88                                                  int offset,
89                                                  size_t number_of_chars,
90                                                  std::string* error) {
91  return true;
92}
93
94void MockInputMethodEngine::HideInputView() {
95}
96
97void MockInputMethodEngine::FocusIn(
98    const IMEEngineHandlerInterface::InputContext& input_context) {
99}
100
101void MockInputMethodEngine::FocusOut() {
102}
103
104void MockInputMethodEngine::Enable(const std::string& component_id) {
105  active_component_id_ = component_id;
106}
107
108void MockInputMethodEngine::Disable() {
109  active_component_id_.clear();
110}
111
112void MockInputMethodEngine::PropertyActivate(const std::string& property_name) {
113  last_activated_property_ = property_name;
114}
115
116void MockInputMethodEngine::Reset() {
117}
118
119void MockInputMethodEngine::ProcessKeyEvent(
120    const ui::KeyEvent& key_event,
121    const KeyEventDoneCallback& callback) {
122}
123
124void MockInputMethodEngine::CandidateClicked(uint32 index) {
125}
126
127void MockInputMethodEngine::SetSurroundingText(const std::string& text,
128                                               uint32 cursor_pos,
129                                               uint32 anchor_pos) {
130}
131
132}  // namespace chromeos
133