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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos.cc

Issue 2891263002: chromeos: Remove some IME methods from ash::SystemTrayDelegate (Closed)
Patch Set: cleanup Created 3 years, 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 15 matching lines...) Expand all
26 #include "base/logging.h" 26 #include "base/logging.h"
27 #include "base/memory/ptr_util.h" 27 #include "base/memory/ptr_util.h"
28 #include "base/metrics/user_metrics.h" 28 #include "base/metrics/user_metrics.h"
29 #include "base/strings/utf_string_conversions.h" 29 #include "base/strings/utf_string_conversions.h"
30 #include "base/sys_info.h" 30 #include "base/sys_info.h"
31 #include "base/time/time.h" 31 #include "base/time/time.h"
32 #include "chrome/browser/browser_process.h" 32 #include "chrome/browser/browser_process.h"
33 #include "chrome/browser/chrome_notification_types.h" 33 #include "chrome/browser/chrome_notification_types.h"
34 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 34 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
35 #include "chrome/browser/chromeos/events/system_key_event_listener.h" 35 #include "chrome/browser/chromeos/events/system_key_event_listener.h"
36 #include "chrome/browser/chromeos/input_method/input_method_switch_recorder.h"
37 #include "chrome/browser/chromeos/input_method/input_method_util.h" 36 #include "chrome/browser/chromeos/input_method/input_method_util.h"
38 #include "chrome/browser/chromeos/login/login_wizard.h" 37 #include "chrome/browser/chromeos/login/login_wizard.h"
39 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 38 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
40 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" 39 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h"
41 #include "chrome/browser/chromeos/profiles/profile_helper.h" 40 #include "chrome/browser/chromeos/profiles/profile_helper.h"
42 #include "chrome/browser/profiles/profile_manager.h" 41 #include "chrome/browser/profiles/profile_manager.h"
43 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" 42 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
44 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h" 43 #include "chrome/browser/ui/ash/networking_config_delegate_chromeos.h"
45 #include "chrome/browser/ui/ash/system_tray_client.h" 44 #include "chrome/browser/ui/ash/system_tray_client.h"
46 #include "chrome/browser/ui/browser.h" 45 #include "chrome/browser/ui/browser.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 248 }
250 } 249 }
251 250
252 base::string16 SystemTrayDelegateChromeOS::GetIMEManagedMessage() { 251 base::string16 SystemTrayDelegateChromeOS::GetIMEManagedMessage() {
253 auto ime_state = input_method::InputMethodManager::Get()->GetActiveIMEState(); 252 auto ime_state = input_method::InputMethodManager::Get()->GetActiveIMEState();
254 return ime_state->GetAllowedInputMethods().empty() 253 return ime_state->GetAllowedInputMethods().empty()
255 ? base::string16() 254 ? base::string16()
256 : l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY); 255 : l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY);
257 } 256 }
258 257
259 void SystemTrayDelegateChromeOS::SwitchIME(const std::string& ime_id) {
260 input_method::InputMethodManager::Get()
261 ->GetActiveIMEState()
262 ->ChangeInputMethod(ime_id, false /* show_message */);
263 input_method::InputMethodSwitchRecorder::Get()->RecordSwitch(
264 true /* by_tray_menu */);
265 }
266
267 void SystemTrayDelegateChromeOS::ActivateIMEProperty(const std::string& key) {
268 input_method::InputMethodManager::Get()->ActivateInputMethodMenuItem(key);
269 }
270
271 ash::NetworkingConfigDelegate* 258 ash::NetworkingConfigDelegate*
272 SystemTrayDelegateChromeOS::GetNetworkingConfigDelegate() const { 259 SystemTrayDelegateChromeOS::GetNetworkingConfigDelegate() const {
273 return networking_config_delegate_.get(); 260 return networking_config_delegate_.get();
274 } 261 }
275 262
276 bool SystemTrayDelegateChromeOS::GetSessionStartTime( 263 bool SystemTrayDelegateChromeOS::GetSessionStartTime(
277 base::TimeTicks* session_start_time) { 264 base::TimeTicks* session_start_time) {
278 *session_start_time = session_start_time_; 265 *session_start_time = session_start_time_;
279 return have_session_start_time_; 266 return have_session_start_time_;
280 } 267 }
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 505
519 void SystemTrayDelegateChromeOS::ImeMenuItemsChanged( 506 void SystemTrayDelegateChromeOS::ImeMenuItemsChanged(
520 const std::string& engine_id, 507 const std::string& engine_id,
521 const std::vector<input_method::InputMethodManager::MenuItem>& items) {} 508 const std::vector<input_method::InputMethodManager::MenuItem>& items) {}
522 509
523 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 510 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
524 return new SystemTrayDelegateChromeOS(); 511 return new SystemTrayDelegateChromeOS();
525 } 512 }
526 513
527 } // namespace chromeos 514 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698