Check USB device path access when prompting users to select a device.
[chromium-blink-merge.git] / chrome / browser / chromeos / input_method / mock_input_method_engine.cc
blob2686cfc43a0febaa39fd21b6d689ebd3a7d352d8
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"
7 #include <map>
9 namespace chromeos {
11 MockInputMethodEngine::MockInputMethodEngine() {}
13 MockInputMethodEngine::~MockInputMethodEngine() {}
15 const std::string& MockInputMethodEngine::GetActiveComponentId() const {
16 return active_component_id_;
19 bool 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;
30 bool MockInputMethodEngine::ClearComposition(int context_id,
31 std::string* error) {
32 return true;
35 bool MockInputMethodEngine::CommitText(int context_id,
36 const char* text,
37 std::string* error) {
38 return true;
41 bool MockInputMethodEngine::SendKeyEvents(
42 int context_id,
43 const std::vector<KeyboardEvent>& events) {
44 return true;
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,
57 std::string* error) {
58 return true;
61 bool MockInputMethodEngine::SetCandidates(
62 int context_id,
63 const std::vector<Candidate>& candidates,
64 std::string* error) {
65 return true;
68 bool MockInputMethodEngine::SetCursorPosition(int context_id,
69 int candidate_id,
70 std::string* error) {
71 return true;
74 bool MockInputMethodEngine::SetMenuItems(const std::vector<MenuItem>& items) {
75 return true;
78 bool MockInputMethodEngine::UpdateMenuItems(
79 const std::vector<MenuItem>& items) {
80 return true;
83 bool MockInputMethodEngine::IsActive() const {
84 return true;
87 bool MockInputMethodEngine::DeleteSurroundingText(int context_id,
88 int offset,
89 size_t number_of_chars,
90 std::string* error) {
91 return true;
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,
128 uint32 cursor_pos,
129 uint32 anchor_pos) {
132 void MockInputMethodEngine::SetCompositionBounds(
133 const std::vector<gfx::Rect>& bounds) {
136 } // namespace chromeos