| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> // std::find | 9 #include <algorithm> // std::find |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 bool enable_extension_loading) | 854 bool enable_extension_loading) |
| 855 : delegate_(std::move(delegate)), | 855 : delegate_(std::move(delegate)), |
| 856 ui_session_(STATE_LOGIN_SCREEN), | 856 ui_session_(STATE_LOGIN_SCREEN), |
| 857 state_(NULL), | 857 state_(NULL), |
| 858 util_(delegate_.get()), | 858 util_(delegate_.get()), |
| 859 component_extension_ime_manager_(new ComponentExtensionIMEManager()), | 859 component_extension_ime_manager_(new ComponentExtensionIMEManager()), |
| 860 enable_extension_loading_(enable_extension_loading), | 860 enable_extension_loading_(enable_extension_loading), |
| 861 is_ime_menu_activated_(false) { | 861 is_ime_menu_activated_(false) { |
| 862 // TODO(mohsen): Revisit using FakeImeKeyboard with mash when InputController | 862 // TODO(mohsen): Revisit using FakeImeKeyboard with mash when InputController |
| 863 // work is ready. http://crbug.com/601981 | 863 // work is ready. http://crbug.com/601981 |
| 864 if (base::SysInfo::IsRunningOnChromeOS() && !chrome::IsRunningInMash()) | 864 if (base::SysInfo::IsRunningAsSystemCompositor() && |
| 865 !chrome::IsRunningInMash()) { |
| 865 keyboard_.reset(ImeKeyboard::Create()); | 866 keyboard_.reset(ImeKeyboard::Create()); |
| 866 else | 867 } else { |
| 867 keyboard_.reset(new FakeImeKeyboard()); | 868 keyboard_.reset(new FakeImeKeyboard()); |
| 869 } |
| 868 | 870 |
| 869 // Initializes the system IME list. | 871 // Initializes the system IME list. |
| 870 std::unique_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate( | 872 std::unique_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate( |
| 871 new ComponentExtensionIMEManagerImpl()); | 873 new ComponentExtensionIMEManagerImpl()); |
| 872 component_extension_ime_manager_->Initialize(std::move(comp_delegate)); | 874 component_extension_ime_manager_->Initialize(std::move(comp_delegate)); |
| 873 const InputMethodDescriptors& descriptors = | 875 const InputMethodDescriptors& descriptors = |
| 874 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); | 876 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); |
| 875 util_.ResetInputMethods(descriptors); | 877 util_.ResetInputMethods(descriptors); |
| 876 chromeos::UserAddingScreen::Get()->AddObserver(this); | 878 chromeos::UserAddingScreen::Get()->AddObserver(this); |
| 877 } | 879 } |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1254 replacements.SetRefStr(overridden_ref); | 1256 replacements.SetRefStr(overridden_ref); |
| 1255 keyboard::SetOverrideContentUrl(url.ReplaceComponents(replacements)); | 1257 keyboard::SetOverrideContentUrl(url.ReplaceComponents(replacements)); |
| 1256 } | 1258 } |
| 1257 | 1259 |
| 1258 bool InputMethodManagerImpl::IsEmojiHandwritingVoiceOnImeMenuEnabled() { | 1260 bool InputMethodManagerImpl::IsEmojiHandwritingVoiceOnImeMenuEnabled() { |
| 1259 return base::FeatureList::IsEnabled(features::kEHVInputOnImeMenu); | 1261 return base::FeatureList::IsEnabled(features::kEHVInputOnImeMenu); |
| 1260 } | 1262 } |
| 1261 | 1263 |
| 1262 } // namespace input_method | 1264 } // namespace input_method |
| 1263 } // namespace chromeos | 1265 } // namespace chromeos |
| OLD | NEW |