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

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

Issue 2086503003: mash: Migrate tray IME view to wm common types, move to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@movea11y
Patch Set: nit Created 4 years, 6 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/virtual_keyboard_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "ash/common/ash_switches.h" 15 #include "ash/common/ash_switches.h"
16 #include "ash/common/session/session_state_delegate.h" 16 #include "ash/common/session/session_state_delegate.h"
17 #include "ash/common/session/session_state_observer.h" 17 #include "ash/common/session/session_state_observer.h"
18 #include "ash/common/shell_window_ids.h" 18 #include "ash/common/shell_window_ids.h"
19 #include "ash/common/system/chromeos/power/power_status.h" 19 #include "ash/common/system/chromeos/power/power_status.h"
20 #include "ash/common/system/chromeos/shutdown_policy_observer.h" 20 #include "ash/common/system/chromeos/shutdown_policy_observer.h"
21 #include "ash/common/system/date/clock_observer.h" 21 #include "ash/common/system/date/clock_observer.h"
22 #include "ash/common/system/ime/ime_observer.h"
22 #include "ash/common/system/tray/system_tray_delegate.h" 23 #include "ash/common/system/tray/system_tray_delegate.h"
23 #include "ash/common/system/tray/wm_system_tray_notifier.h" 24 #include "ash/common/system/tray/wm_system_tray_notifier.h"
24 #include "ash/common/system/tray_accessibility.h" 25 #include "ash/common/system/tray_accessibility.h"
25 #include "ash/common/system/update/update_observer.h" 26 #include "ash/common/system/update/update_observer.h"
26 #include "ash/common/system/volume_control_delegate.h" 27 #include "ash/common/system/volume_control_delegate.h"
27 #include "ash/common/wm_shell.h" 28 #include "ash/common/wm_shell.h"
28 #include "ash/desktop_background/desktop_background_controller.h" 29 #include "ash/desktop_background/desktop_background_controller.h"
29 #include "ash/metrics/user_metrics_recorder.h" 30 #include "ash/metrics/user_metrics_recorder.h"
30 #include "ash/shell.h" 31 #include "ash/shell.h"
31 #include "ash/shell_delegate.h" 32 #include "ash/shell_delegate.h"
32 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h" 33 #include "ash/system/chromeos/bluetooth/bluetooth_observer.h"
33 #include "ash/system/chromeos/session/logout_button_observer.h" 34 #include "ash/system/chromeos/session/logout_button_observer.h"
34 #include "ash/system/ime/ime_observer.h"
35 #include "ash/system/tray/system_tray.h" 35 #include "ash/system/tray/system_tray.h"
36 #include "ash/system/tray/system_tray_notifier.h" 36 #include "ash/system/tray/system_tray_notifier.h"
37 #include "ash/system/user/login_status.h" 37 #include "ash/system/user/login_status.h"
38 #include "ash/system/user/user_observer.h" 38 #include "ash/system/user/user_observer.h"
39 #include "ash/wm/lock_state_controller.h" 39 #include "ash/wm/lock_state_controller.h"
40 #include "base/bind_helpers.h" 40 #include "base/bind_helpers.h"
41 #include "base/callback.h" 41 #include "base/callback.h"
42 #include "base/logging.h" 42 #include "base/logging.h"
43 #include "base/memory/ptr_util.h" 43 #include "base/memory/ptr_util.h"
44 #include "base/memory/weak_ptr.h" 44 #include "base/memory/weak_ptr.h"
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 bool value = user_pref_registrar_->prefs()->GetBoolean( 1138 bool value = user_pref_registrar_->prefs()->GetBoolean(
1139 prefs::kPerformanceTracingEnabled); 1139 prefs::kPerformanceTracingEnabled);
1140 GetSystemTrayNotifier()->NotifyTracingModeChanged(value); 1140 GetSystemTrayNotifier()->NotifyTracingModeChanged(value);
1141 } 1141 }
1142 1142
1143 // Overridden from InputMethodManager::Observer. 1143 // Overridden from InputMethodManager::Observer.
1144 void SystemTrayDelegateChromeOS::InputMethodChanged( 1144 void SystemTrayDelegateChromeOS::InputMethodChanged(
1145 input_method::InputMethodManager* manager, 1145 input_method::InputMethodManager* manager,
1146 Profile* /* profile */, 1146 Profile* /* profile */,
1147 bool show_message) { 1147 bool show_message) {
1148 GetSystemTrayNotifier()->NotifyRefreshIME(); 1148 GetWmSystemTrayNotifier()->NotifyRefreshIME();
1149 } 1149 }
1150 1150
1151 // Overridden from InputMethodMenuManager::Observer. 1151 // Overridden from InputMethodMenuManager::Observer.
1152 void SystemTrayDelegateChromeOS::InputMethodMenuItemChanged( 1152 void SystemTrayDelegateChromeOS::InputMethodMenuItemChanged(
1153 ui::ime::InputMethodMenuManager* manager) { 1153 ui::ime::InputMethodMenuManager* manager) {
1154 GetSystemTrayNotifier()->NotifyRefreshIME(); 1154 GetWmSystemTrayNotifier()->NotifyRefreshIME();
1155 } 1155 }
1156 1156
1157 // Overridden from CrasAudioHandler::AudioObserver. 1157 // Overridden from CrasAudioHandler::AudioObserver.
1158 void SystemTrayDelegateChromeOS::OnOutputNodeVolumeChanged(uint64_t node_id, 1158 void SystemTrayDelegateChromeOS::OnOutputNodeVolumeChanged(uint64_t node_id,
1159 int volume) { 1159 int volume) {
1160 GetSystemTrayNotifier()->NotifyAudioOutputVolumeChanged(node_id, volume); 1160 GetSystemTrayNotifier()->NotifyAudioOutputVolumeChanged(node_id, volume);
1161 } 1161 }
1162 1162
1163 void SystemTrayDelegateChromeOS::OnOutputMuteChanged(bool mute_on, 1163 void SystemTrayDelegateChromeOS::OnOutputMuteChanged(bool mute_on,
1164 bool system_adjust) { 1164 bool system_adjust) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 } 1288 }
1289 1289
1290 void SystemTrayDelegateChromeOS::OnShutdownPolicyChanged( 1290 void SystemTrayDelegateChromeOS::OnShutdownPolicyChanged(
1291 bool reboot_on_shutdown) { 1291 bool reboot_on_shutdown) {
1292 // Notify all observers. 1292 // Notify all observers.
1293 FOR_EACH_OBSERVER(ash::ShutdownPolicyObserver, shutdown_policy_observers_, 1293 FOR_EACH_OBSERVER(ash::ShutdownPolicyObserver, shutdown_policy_observers_,
1294 OnShutdownPolicyChanged(reboot_on_shutdown)); 1294 OnShutdownPolicyChanged(reboot_on_shutdown));
1295 } 1295 }
1296 1296
1297 void SystemTrayDelegateChromeOS::ImeMenuActivationChanged(bool is_active) { 1297 void SystemTrayDelegateChromeOS::ImeMenuActivationChanged(bool is_active) {
1298 GetSystemTrayNotifier()->NotifyRefreshIMEMenu(is_active); 1298 GetWmSystemTrayNotifier()->NotifyRefreshIMEMenu(is_active);
1299 } 1299 }
1300 1300
1301 void SystemTrayDelegateChromeOS::ImeMenuListChanged() {} 1301 void SystemTrayDelegateChromeOS::ImeMenuListChanged() {}
1302 1302
1303 void SystemTrayDelegateChromeOS::ImeMenuItemsChanged( 1303 void SystemTrayDelegateChromeOS::ImeMenuItemsChanged(
1304 const std::string& engine_id, 1304 const std::string& engine_id,
1305 const std::vector<input_method::InputMethodManager::MenuItem>& items) {} 1305 const std::vector<input_method::InputMethodManager::MenuItem>& items) {}
1306 1306
1307 const base::string16 1307 const base::string16
1308 SystemTrayDelegateChromeOS::GetLegacySupervisedUserMessage() const { 1308 SystemTrayDelegateChromeOS::GetLegacySupervisedUserMessage() const {
(...skipping 28 matching lines...) Expand all
1337 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1337 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1338 << "ENABLE_SUPERVISED_USERS undefined."; 1338 << "ENABLE_SUPERVISED_USERS undefined.";
1339 return base::string16(); 1339 return base::string16();
1340 } 1340 }
1341 1341
1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1342 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1343 return new SystemTrayDelegateChromeOS(); 1343 return new SystemTrayDelegateChromeOS();
1344 } 1344 }
1345 1345
1346 } // namespace chromeos 1346 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/virtual_keyboard_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698