fe104e388df5392e562cb522525b1e4982dd7a8e
[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 void MockInputMethodEngine::KeyEventDone(input_method::KeyEventHandle* key_data,
94                                          bool handled) {
95 }
96
97 bool MockInputMethodEngine::DeleteSurroundingText(int context_id,
98                                                   int offset,
99                                                   size_t number_of_chars,
100                                                   std::string* error) {
101   return true;
102 }
103
104 void MockInputMethodEngine::HideInputView() {
105 }
106
107 void MockInputMethodEngine::FocusIn(
108     const IMEEngineHandlerInterface::InputContext& input_context) {
109 }
110
111 void MockInputMethodEngine::FocusOut() {
112 }
113
114 void MockInputMethodEngine::Enable() {
115 }
116
117 void MockInputMethodEngine::Disable() {
118 }
119
120 void MockInputMethodEngine::PropertyActivate(const std::string& property_name) {
121   last_activated_property_ = property_name;
122 }
123
124 void MockInputMethodEngine::Reset() {
125 }
126
127 void MockInputMethodEngine::ProcessKeyEvent(
128     const ui::KeyEvent& key_event,
129     const KeyEventDoneCallback& callback) {
130 }
131
132 void MockInputMethodEngine::CandidateClicked(uint32 index) {
133 }
134
135 void MockInputMethodEngine::SetSurroundingText(const std::string& text,
136                                                uint32 cursor_pos,
137                                                uint32 anchor_pos) {
138 }
139
140 }  // namespace chromeos