Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine.h

Issue 1771173002: Implement input.ime.sendKeyEvents API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failure. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // window. 82 // window.
83 std::string auxiliary_text; 83 std::string auxiliary_text;
84 bool is_auxiliary_text_visible; 84 bool is_auxiliary_text_visible;
85 }; 85 };
86 86
87 InputMethodEngine(); 87 InputMethodEngine();
88 88
89 ~InputMethodEngine() override; 89 ~InputMethodEngine() override;
90 90
91 // IMEEngineHandlerInterface overrides. 91 // IMEEngineHandlerInterface overrides.
92 bool SendKeyEvents(int context_id,
93 const std::vector<KeyboardEvent>& events) override;
94 bool SetCandidateWindowVisible(bool visible, std::string* error) override; 92 bool SetCandidateWindowVisible(bool visible, std::string* error) override;
95 bool SetCursorPosition(int context_id, 93 bool SetCursorPosition(int context_id,
96 int candidate_id, 94 int candidate_id,
97 std::string* error) override; 95 std::string* error) override;
98 bool IsActive() const override; 96 bool IsActive() const override;
99 void Enable(const std::string& component_id) override; 97 void Enable(const std::string& component_id) override;
100 void PropertyActivate(const std::string& property_name) override; 98 void PropertyActivate(const std::string& property_name) override;
101 void CandidateClicked(uint32_t index) override; 99 void CandidateClicked(uint32_t index) override;
102 void HideInputView() override; 100 void HideInputView() override;
103 101
(...skipping 28 matching lines...) Expand all
132 130
133 // Enables overriding input view page to Virtual Keyboard window. 131 // Enables overriding input view page to Virtual Keyboard window.
134 void EnableInputView(); 132 void EnableInputView();
135 133
136 // input_method::InputMethodEngineBase: 134 // input_method::InputMethodEngineBase:
137 void UpdateComposition(const ui::CompositionText& composition_text, 135 void UpdateComposition(const ui::CompositionText& composition_text,
138 uint32_t cursor_pos, 136 uint32_t cursor_pos,
139 bool is_visible) override; 137 bool is_visible) override;
140 void CommitTextToInputContext(int context_id, 138 void CommitTextToInputContext(int context_id,
141 const std::string& text) override; 139 const std::string& text) override;
140 bool SendKeyEvent(ui::KeyEvent* event, const std::string& code) override;
142 141
143 // The current candidate window. 142 // The current candidate window.
144 scoped_ptr<ui::CandidateWindow> candidate_window_; 143 scoped_ptr<ui::CandidateWindow> candidate_window_;
145 144
146 // The current candidate window property. 145 // The current candidate window property.
147 CandidateWindowProperty candidate_window_property_; 146 CandidateWindowProperty candidate_window_property_;
148 147
149 // Indicates whether the candidate window is visible. 148 // Indicates whether the candidate window is visible.
150 bool window_visible_; 149 bool window_visible_;
151 150
152 // Mapping of candidate index to candidate id. 151 // Mapping of candidate index to candidate id.
153 std::vector<int> candidate_ids_; 152 std::vector<int> candidate_ids_;
154 153
155 // Mapping of candidate id to index. 154 // Mapping of candidate id to index.
156 std::map<int, int> candidate_indexes_; 155 std::map<int, int> candidate_indexes_;
157 }; 156 };
158 157
159 } // namespace chromeos 158 } // namespace chromeos
160 159
161 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 160 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698