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

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

Issue 119133003: Make InputMethodEngine manage its descriptor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "ui/base/ime/chromeos/ibus_bridge.h" 11 #include "ui/base/ime/chromeos/ibus_bridge.h"
12 12
13 class GURL; 13 class GURL;
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 namespace input_method { 17 namespace input_method {
18 class InputMethodDescriptor;
18 struct KeyEventHandle; 19 struct KeyEventHandle;
19 } // namespace input_method 20 } // namespace input_method
20 21
21 // InputMethodEngine is used to translate from the Chrome IME API to the native 22 // InputMethodEngine is used to translate from the Chrome IME API to the native
22 // API. 23 // API.
23 class InputMethodEngineInterface : public IBusEngineHandlerInterface { 24 class InputMethodEngineInterface : public IBusEngineHandlerInterface {
24 public: 25 public:
25 struct KeyboardEvent { 26 struct KeyboardEvent {
26 KeyboardEvent(); 27 KeyboardEvent();
27 virtual ~KeyboardEvent(); 28 virtual ~KeyboardEvent();
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 const std::string& text, 163 const std::string& text,
163 int cursor_pos, 164 int cursor_pos,
164 int anchor_pos) = 0; 165 int anchor_pos) = 0;
165 166
166 // Called when Chrome terminates on-going text input session. 167 // Called when Chrome terminates on-going text input session.
167 virtual void OnReset(const std::string& engine_id) = 0; 168 virtual void OnReset(const std::string& engine_id) = 0;
168 }; 169 };
169 170
170 virtual ~InputMethodEngineInterface() {} 171 virtual ~InputMethodEngineInterface() {}
171 172
173 virtual const input_method::InputMethodDescriptor& GetDescriptor() const = 0;
174
172 // Called when the input metho initialization is done. 175 // Called when the input metho initialization is done.
173 // This function is called from private API. 176 // This function is called from private API.
174 // TODO(nona): Remove this function. 177 // TODO(nona): Remove this function.
175 virtual void StartIme() = 0; 178 virtual void StartIme() = 0;
176 179
177 // Set the current composition and associated properties. 180 // Set the current composition and associated properties.
178 virtual bool SetComposition(int context_id, 181 virtual bool SetComposition(int context_id,
179 const char* text, 182 const char* text,
180 int selection_start, 183 int selection_start,
181 int selection_end, 184 int selection_end,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 size_t number_of_chars, 247 size_t number_of_chars,
245 std::string* error) = 0; 248 std::string* error) = 0;
246 249
247 // Hides the input view window (from API call). 250 // Hides the input view window (from API call).
248 virtual void HideInputView() = 0; 251 virtual void HideInputView() = 0;
249 }; 252 };
250 253
251 } // namespace chromeos 254 } // namespace chromeos
252 255
253 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_ 256 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_ENGINE_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698