OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // TODO(satorux): Move this from 'cros' directory to 'input_method' | 5 // TODO(satorux): Move this from 'cros' directory to 'input_method' |
6 // directory. | 6 // directory. |
7 | 7 |
8 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_H_ | 8 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_H_ |
9 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_H_ | 9 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_H_ |
10 #pragma once | 10 #pragma once |
11 | 11 |
| 12 #include <map> |
12 #include <set> | 13 #include <set> |
13 #include <string> | 14 #include <string> |
14 #include <utility> | 15 #include <utility> |
15 #include <vector> | 16 #include <vector> |
16 | 17 |
17 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
18 #include "base/time.h" | 19 #include "base/time.h" |
19 #include "base/timer.h" | 20 #include "base/timer.h" |
20 #include "chrome/browser/chromeos/input_method/ibus_controller.h" | 21 #include "chrome/browser/chromeos/input_method/ibus_controller.h" |
21 | 22 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Clears last N handwriting strokes in libcros. See | 160 // Clears last N handwriting strokes in libcros. See |
160 // chromeos::CancelHandwriting for details. | 161 // chromeos::CancelHandwriting for details. |
161 virtual void CancelHandwritingStrokes(int stroke_count) = 0; | 162 virtual void CancelHandwritingStrokes(int stroke_count) = 0; |
162 | 163 |
163 // Registers a new virtual keyboard for |layouts|. Set |is_system| true when | 164 // Registers a new virtual keyboard for |layouts|. Set |is_system| true when |
164 // the keyboard is provided as a content extension. System virtual keyboards | 165 // the keyboard is provided as a content extension. System virtual keyboards |
165 // have lower priority than non-system ones. See virtual_keyboard_selector.h | 166 // have lower priority than non-system ones. See virtual_keyboard_selector.h |
166 // for details. | 167 // for details. |
167 // TODO(yusukes): Add UnregisterVirtualKeyboard function as well. | 168 // TODO(yusukes): Add UnregisterVirtualKeyboard function as well. |
168 virtual void RegisterVirtualKeyboard(const GURL& launch_url, | 169 virtual void RegisterVirtualKeyboard(const GURL& launch_url, |
| 170 const std::string& name, |
169 const std::set<std::string>& layouts, | 171 const std::set<std::string>& layouts, |
170 bool is_system) = 0; | 172 bool is_system) = 0; |
171 | 173 |
172 // Sets user preference on virtual keyboard selection. | 174 // Sets user preference on virtual keyboard selection. |
173 // See virtual_keyboard_selector.h for details. | 175 // See virtual_keyboard_selector.h for details. |
174 virtual bool SetVirtualKeyboardPreference(const std::string& input_method_id, | 176 virtual bool SetVirtualKeyboardPreference(const std::string& input_method_id, |
175 const GURL& extention_url) = 0; | 177 const GURL& extention_url) = 0; |
176 | 178 |
177 // Clears all preferences on virtual keyboard selection. | 179 // Clears all preferences on virtual keyboard selection. |
178 // See virtual_keyboard_selector.h for details. | 180 // See virtual_keyboard_selector.h for details. |
179 virtual void ClearAllVirtualKeyboardPreferences() = 0; | 181 virtual void ClearAllVirtualKeyboardPreferences() = 0; |
180 | 182 |
| 183 // Returns a map from extension URL to virtual keyboard extension. |
| 184 virtual const std::map<GURL, const VirtualKeyboard*>& |
| 185 GetUrlToKeyboardMapping() const = 0; |
| 186 |
| 187 // Returns a multi map from layout name to virtual keyboard extension. |
| 188 virtual const std::multimap<std::string, const VirtualKeyboard*>& |
| 189 GetLayoutNameToKeyboardMapping() const = 0; |
| 190 |
181 virtual input_method::InputMethodDescriptor previous_input_method() const = 0; | 191 virtual input_method::InputMethodDescriptor previous_input_method() const = 0; |
182 virtual input_method::InputMethodDescriptor current_input_method() const = 0; | 192 virtual input_method::InputMethodDescriptor current_input_method() const = 0; |
183 | 193 |
184 virtual const input_method::ImePropertyList& current_ime_properties() | 194 virtual const input_method::ImePropertyList& current_ime_properties() |
185 const = 0; | 195 const = 0; |
186 }; | 196 }; |
187 | 197 |
188 } // namespace input_method | 198 } // namespace input_method |
189 } // namespace chromeos | 199 } // namespace chromeos |
190 | 200 |
191 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_H_ | 201 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_MANAGER_H_ |
OLD | NEW |