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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_manager_impl.cc

Issue 2585633004: ozone: Allow ozone evdev/kvm features to be enabled without running on ChromeOS. (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 #include <set> 11 #include <set>
12 #include <sstream> 12 #include <sstream>
13 #include <utility> 13 #include <utility>
14 14
15 #include "ash/shell.h" 15 #include "ash/shell.h"
16 #include "base/bind.h" 16 #include "base/bind.h"
17 #include "base/feature_list.h" 17 #include "base/feature_list.h"
18 #include "base/hash.h" 18 #include "base/hash.h"
19 #include "base/location.h" 19 #include "base/location.h"
20 #include "base/metrics/histogram_macros.h" 20 #include "base/metrics/histogram_macros.h"
21 #include "base/metrics/sparse_histogram.h" 21 #include "base/metrics/sparse_histogram.h"
22 #include "base/strings/string_split.h" 22 #include "base/strings/string_split.h"
23 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
24 #include "base/sys_info.h"
25 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
26 #include "chrome/browser/chromeos/input_method/candidate_window_controller.h" 25 #include "chrome/browser/chromeos/input_method/candidate_window_controller.h"
27 #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"
28 #include "chrome/browser/chromeos/input_method/input_method_switch_recorder.h" 27 #include "chrome/browser/chromeos/input_method/input_method_switch_recorder.h"
29 #include "chrome/browser/chromeos/language_preferences.h" 28 #include "chrome/browser/chromeos/language_preferences.h"
30 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 29 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
31 #include "chrome/browser/chromeos/profiles/profile_helper.h" 30 #include "chrome/browser/chromeos/profiles/profile_helper.h"
32 #include "chrome/browser/profiles/profile_manager.h" 31 #include "chrome/browser/profiles/profile_manager.h"
33 #include "chrome/browser/ui/ash/ash_util.h" 32 #include "chrome/browser/ui/ash/ash_util.h"
34 #include "chrome/common/chrome_features.h" 33 #include "chrome/common/chrome_features.h"
35 #include "chrome/common/pref_names.h" 34 #include "chrome/common/pref_names.h"
35 #include "chromeos/system/devicemode.h"
36 #include "components/prefs/pref_service.h" 36 #include "components/prefs/pref_service.h"
37 #include "components/user_manager/user_manager.h" 37 #include "components/user_manager/user_manager.h"
38 #include "third_party/icu/source/common/unicode/uloc.h" 38 #include "third_party/icu/source/common/unicode/uloc.h"
39 #include "ui/base/accelerators/accelerator.h" 39 #include "ui/base/accelerators/accelerator.h"
40 #include "ui/base/ime/chromeos/component_extension_ime_manager.h" 40 #include "ui/base/ime/chromeos/component_extension_ime_manager.h"
41 #include "ui/base/ime/chromeos/extension_ime_util.h" 41 #include "ui/base/ime/chromeos/extension_ime_util.h"
42 #include "ui/base/ime/chromeos/fake_ime_keyboard.h" 42 #include "ui/base/ime/chromeos/fake_ime_keyboard.h"
43 #include "ui/base/ime/chromeos/ime_keyboard.h" 43 #include "ui/base/ime/chromeos/ime_keyboard.h"
44 #include "ui/base/ime/chromeos/input_method_delegate.h" 44 #include "ui/base/ime/chromeos/input_method_delegate.h"
45 #include "ui/base/ime/ime_bridge.h" 45 #include "ui/base/ime/ime_bridge.h"
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (IsRunningAsSystemCompositor() && !chrome::IsRunningInMash())
865 keyboard_.reset(ImeKeyboard::Create()); 865 keyboard_.reset(ImeKeyboard::Create());
866 else 866 else
867 keyboard_.reset(new FakeImeKeyboard()); 867 keyboard_.reset(new FakeImeKeyboard());
868 868
869 // Initializes the system IME list. 869 // Initializes the system IME list.
870 std::unique_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate( 870 std::unique_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate(
871 new ComponentExtensionIMEManagerImpl()); 871 new ComponentExtensionIMEManagerImpl());
872 component_extension_ime_manager_->Initialize(std::move(comp_delegate)); 872 component_extension_ime_manager_->Initialize(std::move(comp_delegate));
873 const InputMethodDescriptors& descriptors = 873 const InputMethodDescriptors& descriptors =
874 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); 874 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor();
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 if (keyboard_controller) 1265 if (keyboard_controller)
1266 keyboard_controller->Reload(); 1266 keyboard_controller->Reload();
1267 } 1267 }
1268 1268
1269 bool InputMethodManagerImpl::IsEmojiHandwritingVoiceOnImeMenuEnabled() { 1269 bool InputMethodManagerImpl::IsEmojiHandwritingVoiceOnImeMenuEnabled() {
1270 return base::FeatureList::IsEnabled(features::kEHVInputOnImeMenu); 1270 return base::FeatureList::IsEnabled(features::kEHVInputOnImeMenu);
1271 } 1271 }
1272 1272
1273 } // namespace input_method 1273 } // namespace input_method
1274 } // namespace chromeos 1274 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698