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