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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 | Annotate | Revision Log
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/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
11 #include "ash/system/brightness/brightness_observer.h" 11 #include "ash/system/brightness/brightness_observer.h"
12 #include "ash/system/date/clock_observer.h" 12 #include "ash/system/date/clock_observer.h"
13 #include "ash/system/drive/drive_observer.h" 13 #include "ash/system/drive/drive_observer.h"
14 #include "ash/system/ime/ime_observer.h" 14 #include "ash/system/ime/ime_observer.h"
15 #include "ash/system/network/network_observer.h" 15 #include "ash/system/network/network_observer.h"
16 #include "ash/system/power/power_status_observer.h" 16 #include "ash/system/power/power_status_observer.h"
17 #include "ash/system/status_area_widget.h"
18 #include "ash/system/tray/system_tray.h" 17 #include "ash/system/tray/system_tray.h"
19 #include "ash/system/tray/system_tray_delegate.h" 18 #include "ash/system/tray/system_tray_delegate.h"
20 #include "ash/system/tray_accessibility.h" 19 #include "ash/system/tray_accessibility.h"
21 #include "ash/system/tray_caps_lock.h" 20 #include "ash/system/tray_caps_lock.h"
22 #include "ash/system/user/update_observer.h" 21 #include "ash/system/user/update_observer.h"
23 #include "ash/system/user/user_observer.h" 22 #include "ash/system/user/user_observer.h"
24 #include "ash/volume_control_delegate.h" 23 #include "ash/volume_control_delegate.h"
25 #include "base/bind_helpers.h" 24 #include "base/bind_helpers.h"
26 #include "base/callback.h" 25 #include "base/callback.h"
27 #include "base/chromeos/chromeos_version.h" 26 #include "base/chromeos/chromeos_version.h"
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 OnPowerStatusChanged(power_status)); 936 OnPowerStatusChanged(power_status));
938 } 937 }
939 938
940 virtual void SystemResumed() OVERRIDE { 939 virtual void SystemResumed() OVERRIDE {
941 NotifyRefreshClock(); 940 NotifyRefreshClock();
942 } 941 }
943 942
944 // Overridden from SessionManagerClient::Observer. 943 // Overridden from SessionManagerClient::Observer.
945 virtual void LockScreen() OVERRIDE { 944 virtual void LockScreen() OVERRIDE {
946 screen_locked_ = true; 945 screen_locked_ = true;
947 ash::Shell::GetInstance()->status_area_widget()-> 946 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
948 UpdateAfterLoginStatusChange(GetUserLoginStatus()); 947 GetUserLoginStatus());
949 } 948 }
950 949
951 virtual void UnlockScreen() OVERRIDE { 950 virtual void UnlockScreen() OVERRIDE {
952 screen_locked_ = false; 951 screen_locked_ = false;
953 ash::Shell::GetInstance()->status_area_widget()-> 952 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
954 UpdateAfterLoginStatusChange(GetUserLoginStatus()); 953 GetUserLoginStatus());
955 } 954 }
956 955
957 // TODO(sad): Override more from PowerManagerClient::Observer here (e.g. 956 // TODO(sad): Override more from PowerManagerClient::Observer here (e.g.
958 // PowerButtonStateChanged etc.). 957 // PowerButtonStateChanged etc.).
959 958
960 // Overridden from NetworkMenuIcon::Delegate. 959 // Overridden from NetworkMenuIcon::Delegate.
961 virtual void NetworkMenuIconChanged() OVERRIDE { 960 virtual void NetworkMenuIconChanged() OVERRIDE {
962 NotifyRefreshNetwork(); 961 NotifyRefreshNetwork();
963 } 962 }
964 963
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 break; 1067 break;
1069 } 1068 }
1070 case chrome::NOTIFICATION_PROFILE_CREATED: { 1069 case chrome::NOTIFICATION_PROFILE_CREATED: {
1071 SetProfile(content::Source<Profile>(source).ptr()); 1070 SetProfile(content::Source<Profile>(source).ptr());
1072 registrar_.Remove(this, 1071 registrar_.Remove(this,
1073 chrome::NOTIFICATION_PROFILE_CREATED, 1072 chrome::NOTIFICATION_PROFILE_CREATED,
1074 content::NotificationService::AllSources()); 1073 content::NotificationService::AllSources());
1075 break; 1074 break;
1076 } 1075 }
1077 case chrome::NOTIFICATION_SESSION_STARTED: { 1076 case chrome::NOTIFICATION_SESSION_STARTED: {
1078 ash::Shell::GetInstance()->status_area_widget()-> 1077 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
1079 UpdateAfterLoginStatusChange(GetUserLoginStatus()); 1078 GetUserLoginStatus());
1080 SetProfile(ProfileManager::GetDefaultProfile()); 1079 SetProfile(ProfileManager::GetDefaultProfile());
1081 break; 1080 break;
1082 } 1081 }
1083 default: 1082 default:
1084 NOTREACHED(); 1083 NOTREACHED();
1085 } 1084 }
1086 } 1085 }
1087 1086
1088 // Overridden from InputMethodManager::Observer. 1087 // Overridden from InputMethodManager::Observer.
1089 virtual void InputMethodChanged( 1088 virtual void InputMethodChanged(
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1260 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1262 }; 1261 };
1263 1262
1264 } // namespace 1263 } // namespace
1265 1264
1266 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1265 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1267 return new chromeos::SystemTrayDelegate(tray); 1266 return new chromeos::SystemTrayDelegate(tray);
1268 } 1267 }
1269 1268
1270 } // namespace chromeos 1269 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698