| 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 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include <glib.h> | 9 #include <glib.h> |
| 10 | 10 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 virtual void RegisterVirtualKeyboard(const GURL& launch_url, | 305 virtual void RegisterVirtualKeyboard(const GURL& launch_url, |
| 306 const std::set<std::string>& layouts, | 306 const std::set<std::string>& layouts, |
| 307 bool is_system) { | 307 bool is_system) { |
| 308 virtual_keyboard_selector_.AddVirtualKeyboard(launch_url, | 308 virtual_keyboard_selector_.AddVirtualKeyboard(launch_url, |
| 309 layouts, | 309 layouts, |
| 310 is_system); | 310 is_system); |
| 311 } | 311 } |
| 312 | 312 |
| 313 virtual bool SetVirtualKeyboardPreference(const std::string& input_method_id, |
| 314 const GURL& extention_url) { |
| 315 return virtual_keyboard_selector_.SetUserPreference( |
| 316 input_method_id, extention_url); |
| 317 } |
| 318 |
| 319 virtual void ClearAllVirtualKeyboardPreferences() { |
| 320 return virtual_keyboard_selector_.ClearAllUserPreferences(); |
| 321 } |
| 322 |
| 313 static InputMethodManagerImpl* GetInstance() { | 323 static InputMethodManagerImpl* GetInstance() { |
| 314 return Singleton<InputMethodManagerImpl, | 324 return Singleton<InputMethodManagerImpl, |
| 315 DefaultSingletonTraits<InputMethodManagerImpl> >::get(); | 325 DefaultSingletonTraits<InputMethodManagerImpl> >::get(); |
| 316 } | 326 } |
| 317 | 327 |
| 318 private: | 328 private: |
| 319 friend struct DefaultSingletonTraits<InputMethodManagerImpl>; | 329 friend struct DefaultSingletonTraits<InputMethodManagerImpl>; |
| 320 | 330 |
| 321 // Returns true if the given input method config value is a single | 331 // Returns true if the given input method config value is a single |
| 322 // element string list that contains an input method ID of a keyboard | 332 // element string list that contains an input method ID of a keyboard |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 return InputMethodManagerImpl::GetInstance(); | 969 return InputMethodManagerImpl::GetInstance(); |
| 960 } | 970 } |
| 961 | 971 |
| 962 } // namespace input_method | 972 } // namespace input_method |
| 963 } // namespace chromeos | 973 } // namespace chromeos |
| 964 | 974 |
| 965 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 975 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
| 966 // won't be deleted until it's last InvokeLater is run. | 976 // won't be deleted until it's last InvokeLater is run. |
| 967 DISABLE_RUNNABLE_METHOD_REFCOUNT( | 977 DISABLE_RUNNABLE_METHOD_REFCOUNT( |
| 968 chromeos::input_method::InputMethodManagerImpl); | 978 chromeos::input_method::InputMethodManagerImpl); |
| OLD | NEW |