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

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

Issue 1657593007: Implement chrome.input.ime.setComposition/commitText API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Checkout InputImeEventRouter. Created 4 years, 10 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
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 bool UpdateMenuItems(const std::vector<MenuItem>& items); 144 bool UpdateMenuItems(const std::vector<MenuItem>& items);
145 145
146 private: 146 private:
147 // Converts MenuItem to InputMethodMenuItem. 147 // Converts MenuItem to InputMethodMenuItem.
148 void MenuItemToProperty(const MenuItem& item, 148 void MenuItemToProperty(const MenuItem& item,
149 ui::ime::InputMethodMenuItem* property); 149 ui::ime::InputMethodMenuItem* property);
150 150
151 // Enables overriding input view page to Virtual Keyboard window. 151 // Enables overriding input view page to Virtual Keyboard window.
152 void EnableInputView(); 152 void EnableInputView();
153 153
154 // input_method::InputMethodEngineBase:
155 void UpdateComposition(const ui::CompositionText& composition_text,
156 uint32_t cursor_pos,
157 bool is_visible) override;
158 void CommitTextToInputContext(int context_id, const char* text) override;
Devlin 2016/02/04 00:09:17 Is there a reason this has to be a const char* ins
Azure Wei 2016/02/04 03:21:19 Yeah, it's more convenient to use const std::strin
159
154 // The current candidate window. 160 // The current candidate window.
155 scoped_ptr<ui::CandidateWindow> candidate_window_; 161 scoped_ptr<ui::CandidateWindow> candidate_window_;
156 162
157 // The current candidate window property. 163 // The current candidate window property.
158 CandidateWindowProperty candidate_window_property_; 164 CandidateWindowProperty candidate_window_property_;
159 165
160 // Indicates whether the candidate window is visible. 166 // Indicates whether the candidate window is visible.
161 bool window_visible_; 167 bool window_visible_;
162 168
163 // Mapping of candidate index to candidate id. 169 // Mapping of candidate index to candidate id.
164 std::vector<int> candidate_ids_; 170 std::vector<int> candidate_ids_;
165 171
166 // Mapping of candidate id to index. 172 // Mapping of candidate id to index.
167 std::map<int, int> candidate_indexes_; 173 std::map<int, int> candidate_indexes_;
168 }; 174 };
169 175
170 } // namespace chromeos 176 } // namespace chromeos
171 177
172 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_ 178 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698