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() {}
13 MockInputMethodEngine::~MockInputMethodEngine() {}
15 const std::string
& MockInputMethodEngine::GetActiveComponentId() const {
16 return active_component_id_
;
19 bool MockInputMethodEngine::SetComposition(
25 const std::vector
<SegmentInfo
>& segments
,
30 bool MockInputMethodEngine::ClearComposition(int context_id
,
35 bool MockInputMethodEngine::CommitText(int context_id
,
41 bool MockInputMethodEngine::SendKeyEvents(
43 const std::vector
<KeyboardEvent
>& events
) {
47 const MockInputMethodEngine::CandidateWindowProperty
&
48 MockInputMethodEngine::GetCandidateWindowProperty() const {
49 return candidate_window_property_
;
52 void MockInputMethodEngine::SetCandidateWindowProperty(
53 const CandidateWindowProperty
& property
) {
56 bool MockInputMethodEngine::SetCandidateWindowVisible(bool visible
,
61 bool MockInputMethodEngine::SetCandidates(
63 const std::vector
<Candidate
>& candidates
,
68 bool MockInputMethodEngine::SetCursorPosition(int context_id
,
74 bool MockInputMethodEngine::SetMenuItems(const std::vector
<MenuItem
>& items
) {
78 bool MockInputMethodEngine::UpdateMenuItems(
79 const std::vector
<MenuItem
>& items
) {
83 bool MockInputMethodEngine::IsActive() const {
87 bool MockInputMethodEngine::DeleteSurroundingText(int context_id
,
89 size_t number_of_chars
,
94 void MockInputMethodEngine::HideInputView() {
97 void MockInputMethodEngine::FocusIn(
98 const IMEEngineHandlerInterface::InputContext
& input_context
) {
101 void MockInputMethodEngine::FocusOut() {
104 void MockInputMethodEngine::Enable(const std::string
& component_id
) {
105 active_component_id_
= component_id
;
108 void MockInputMethodEngine::Disable() {
109 active_component_id_
.clear();
112 void MockInputMethodEngine::PropertyActivate(const std::string
& property_name
) {
113 last_activated_property_
= property_name
;
116 void MockInputMethodEngine::Reset() {
119 void MockInputMethodEngine::ProcessKeyEvent(
120 const ui::KeyEvent
& key_event
,
121 const KeyEventDoneCallback
& callback
) {
124 void MockInputMethodEngine::CandidateClicked(uint32 index
) {
127 void MockInputMethodEngine::SetSurroundingText(const std::string
& text
,
132 void MockInputMethodEngine::SetCompositionBounds(
133 const std::vector
<gfx::Rect
>& bounds
) {
136 } // namespace chromeos