| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #include "chrome/browser/chromeos/input_method/mock_input_method_engine.h" | 6 #include "chrome/browser/chromeos/input_method/mock_input_method_engine.h" |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| 11 | 11 |
| 12 MockInputMethodEngine::MockInputMethodEngine() {} | 12 MockInputMethodEngine::MockInputMethodEngine() {} |
| 13 | 13 |
| 14 MockInputMethodEngine::~MockInputMethodEngine() {} | 14 MockInputMethodEngine::~MockInputMethodEngine() {} |
| 15 | 15 |
| 16 const std::string& MockInputMethodEngine::GetActiveComponentId() const { | 16 const std::string& MockInputMethodEngine::GetActiveComponentId() const { |
| 17 return active_component_id_; | 17 return active_component_id_; |
| 18 } | 18 } |
| 19 | 19 |
| 20 bool MockInputMethodEngine::SetComposition( | |
| 21 int context_id, | |
| 22 const char* text, | |
| 23 int selection_start, | |
| 24 int selection_end, | |
| 25 int cursor, | |
| 26 const std::vector<SegmentInfo>& segments, | |
| 27 std::string* error) { | |
| 28 return true; | |
| 29 } | |
| 30 | |
| 31 bool MockInputMethodEngine::ClearComposition(int context_id, | 20 bool MockInputMethodEngine::ClearComposition(int context_id, |
| 32 std::string* error) { | 21 std::string* error) { |
| 33 return true; | 22 return true; |
| 34 } | 23 } |
| 35 | 24 |
| 36 bool MockInputMethodEngine::CommitText(int context_id, | 25 bool MockInputMethodEngine::CommitText(int context_id, |
| 37 const char* text, | 26 const char* text, |
| 38 std::string* error) { | 27 std::string* error) { |
| 39 return true; | 28 return true; |
| 40 } | 29 } |
| 41 | 30 |
| 42 bool MockInputMethodEngine::SendKeyEvents( | |
| 43 int context_id, | |
| 44 const std::vector<KeyboardEvent>& events) { | |
| 45 return true; | |
| 46 } | |
| 47 | |
| 48 const MockInputMethodEngine::CandidateWindowProperty& | |
| 49 MockInputMethodEngine::GetCandidateWindowProperty() const { | |
| 50 return candidate_window_property_; | |
| 51 } | |
| 52 | |
| 53 void MockInputMethodEngine::SetCandidateWindowProperty( | |
| 54 const CandidateWindowProperty& property) {} | |
| 55 | |
| 56 bool MockInputMethodEngine::SetCandidateWindowVisible(bool visible, | 31 bool MockInputMethodEngine::SetCandidateWindowVisible(bool visible, |
| 57 std::string* error) { | 32 std::string* error) { |
| 58 return true; | 33 return true; |
| 59 } | 34 } |
| 60 | 35 |
| 61 bool MockInputMethodEngine::SetCandidates( | |
| 62 int context_id, | |
| 63 const std::vector<Candidate>& candidates, | |
| 64 std::string* error) { | |
| 65 return true; | |
| 66 } | |
| 67 | |
| 68 bool MockInputMethodEngine::SetCursorPosition(int context_id, | 36 bool MockInputMethodEngine::SetCursorPosition(int context_id, |
| 69 int candidate_id, | 37 int candidate_id, |
| 70 std::string* error) { | 38 std::string* error) { |
| 71 return true; | 39 return true; |
| 72 } | 40 } |
| 73 | 41 |
| 74 bool MockInputMethodEngine::SetMenuItems(const std::vector<MenuItem>& items) { | |
| 75 return true; | |
| 76 } | |
| 77 | |
| 78 bool MockInputMethodEngine::UpdateMenuItems( | |
| 79 const std::vector<MenuItem>& items) { | |
| 80 return true; | |
| 81 } | |
| 82 | |
| 83 bool MockInputMethodEngine::IsActive() const { | 42 bool MockInputMethodEngine::IsActive() const { |
| 84 return true; | 43 return true; |
| 85 } | 44 } |
| 86 | 45 |
| 87 bool MockInputMethodEngine::DeleteSurroundingText(int context_id, | 46 bool MockInputMethodEngine::DeleteSurroundingText(int context_id, |
| 88 int offset, | 47 int offset, |
| 89 size_t number_of_chars, | 48 size_t number_of_chars, |
| 90 std::string* error) { | 49 std::string* error) { |
| 91 return true; | 50 return true; |
| 92 } | 51 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 123 | 82 |
| 124 void MockInputMethodEngine::SetSurroundingText(const std::string& text, | 83 void MockInputMethodEngine::SetSurroundingText(const std::string& text, |
| 125 uint32_t cursor_pos, | 84 uint32_t cursor_pos, |
| 126 uint32_t anchor_pos, | 85 uint32_t anchor_pos, |
| 127 uint32_t offset_pos) {} | 86 uint32_t offset_pos) {} |
| 128 | 87 |
| 129 void MockInputMethodEngine::SetCompositionBounds( | 88 void MockInputMethodEngine::SetCompositionBounds( |
| 130 const std::vector<gfx::Rect>& bounds) {} | 89 const std::vector<gfx::Rect>& bounds) {} |
| 131 | 90 |
| 132 } // namespace chromeos | 91 } // namespace chromeos |
| OLD | NEW |