| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_impl.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> // std::find | 7 #include <algorithm> // std::find |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" | 26 #include "chrome/browser/chromeos/input_method/component_extension_ime_manager_i
mpl.h" |
| 27 #include "chrome/browser/chromeos/input_method/input_method_engine.h" | 27 #include "chrome/browser/chromeos/input_method/input_method_engine.h" |
| 28 #include "chrome/browser/chromeos/language_preferences.h" | 28 #include "chrome/browser/chromeos/language_preferences.h" |
| 29 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 29 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 30 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 30 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 31 #include "chrome/browser/profiles/profile_manager.h" | 31 #include "chrome/browser/profiles/profile_manager.h" |
| 32 #include "chrome/common/pref_names.h" | 32 #include "chrome/common/pref_names.h" |
| 33 #include "chromeos/ime/component_extension_ime_manager.h" | 33 #include "chromeos/ime/component_extension_ime_manager.h" |
| 34 #include "chromeos/ime/extension_ime_util.h" | 34 #include "chromeos/ime/extension_ime_util.h" |
| 35 #include "chromeos/ime/fake_ime_keyboard.h" | 35 #include "chromeos/ime/fake_ime_keyboard.h" |
| 36 #include "chromeos/ime/ime_keyboard.h" | 36 #include "chromeos/ime/ime_keyboard_x11.h" |
| 37 #include "chromeos/ime/input_method_delegate.h" | 37 #include "chromeos/ime/input_method_delegate.h" |
| 38 #include "components/user_manager/user_manager.h" | 38 #include "components/user_manager/user_manager.h" |
| 39 #include "third_party/icu/source/common/unicode/uloc.h" | 39 #include "third_party/icu/source/common/unicode/uloc.h" |
| 40 #include "ui/base/accelerators/accelerator.h" | 40 #include "ui/base/accelerators/accelerator.h" |
| 41 #include "ui/keyboard/keyboard_controller.h" | 41 #include "ui/keyboard/keyboard_controller.h" |
| 42 #include "ui/keyboard/keyboard_util.h" | 42 #include "ui/keyboard/keyboard_util.h" |
| 43 | 43 |
| 44 namespace chromeos { | 44 namespace chromeos { |
| 45 namespace input_method { | 45 namespace input_method { |
| 46 | 46 |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 InputMethodManagerImpl::InputMethodManagerImpl( | 832 InputMethodManagerImpl::InputMethodManagerImpl( |
| 833 scoped_ptr<InputMethodDelegate> delegate, | 833 scoped_ptr<InputMethodDelegate> delegate, |
| 834 bool enable_extension_loading) | 834 bool enable_extension_loading) |
| 835 : delegate_(delegate.Pass()), | 835 : delegate_(delegate.Pass()), |
| 836 ui_session_(STATE_LOGIN_SCREEN), | 836 ui_session_(STATE_LOGIN_SCREEN), |
| 837 state_(NULL), | 837 state_(NULL), |
| 838 util_(delegate_.get()), | 838 util_(delegate_.get()), |
| 839 component_extension_ime_manager_(new ComponentExtensionIMEManager()), | 839 component_extension_ime_manager_(new ComponentExtensionIMEManager()), |
| 840 enable_extension_loading_(enable_extension_loading) { | 840 enable_extension_loading_(enable_extension_loading) { |
| 841 if (base::SysInfo::IsRunningOnChromeOS()) | 841 if (base::SysInfo::IsRunningOnChromeOS()) |
| 842 keyboard_.reset(ImeKeyboard::Create()); | 842 keyboard_.reset(new ImeKeyboardX11()); |
| 843 else | 843 else |
| 844 keyboard_.reset(new FakeImeKeyboard()); | 844 keyboard_.reset(new FakeImeKeyboard()); |
| 845 | 845 |
| 846 // Initializes the system IME list. | 846 // Initializes the system IME list. |
| 847 scoped_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate( | 847 scoped_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate( |
| 848 new ComponentExtensionIMEManagerImpl()); | 848 new ComponentExtensionIMEManagerImpl()); |
| 849 component_extension_ime_manager_->Initialize(comp_delegate.Pass()); | 849 component_extension_ime_manager_->Initialize(comp_delegate.Pass()); |
| 850 const InputMethodDescriptors& descriptors = | 850 const InputMethodDescriptors& descriptors = |
| 851 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); | 851 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); |
| 852 util_.ResetInputMethods(descriptors); | 852 util_.ResetInputMethods(descriptors); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 if (candidate_window_controller_.get()) | 1153 if (candidate_window_controller_.get()) |
| 1154 return; | 1154 return; |
| 1155 | 1155 |
| 1156 candidate_window_controller_.reset( | 1156 candidate_window_controller_.reset( |
| 1157 CandidateWindowController::CreateCandidateWindowController()); | 1157 CandidateWindowController::CreateCandidateWindowController()); |
| 1158 candidate_window_controller_->AddObserver(this); | 1158 candidate_window_controller_->AddObserver(this); |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 } // namespace input_method | 1161 } // namespace input_method |
| 1162 } // namespace chromeos | 1162 } // namespace chromeos |
| OLD | NEW |