OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_common.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_common.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_delegate.h" | 8 #include "ash/shell_delegate.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/system_tray_notifier.h" | 10 #include "ash/system/tray/system_tray_notifier.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 } | 261 } |
262 | 262 |
263 void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver( | 263 void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver( |
264 ash::CustodianInfoTrayObserver* observer) { | 264 ash::CustodianInfoTrayObserver* observer) { |
265 } | 265 } |
266 | 266 |
267 void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver( | 267 void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver( |
268 ash::CustodianInfoTrayObserver* observer) { | 268 ash::CustodianInfoTrayObserver* observer) { |
269 } | 269 } |
270 | 270 |
| 271 void SystemTrayDelegateCommon::AddShutdownPolicyObserver( |
| 272 ash::ShutdownPolicyObserver* observer) { |
| 273 } |
| 274 |
| 275 void SystemTrayDelegateCommon::RemoveShutdownPolicyObserver( |
| 276 ash::ShutdownPolicyObserver* observer) { |
| 277 } |
| 278 |
| 279 void SystemTrayDelegateCommon::ShouldRebootOnShutdown( |
| 280 const ash::RebootOnShutdownCallback& callback) { |
| 281 } |
| 282 |
271 ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() { | 283 ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() { |
272 return ash::Shell::GetInstance()->system_tray_notifier(); | 284 return ash::Shell::GetInstance()->system_tray_notifier(); |
273 } | 285 } |
274 | 286 |
275 void SystemTrayDelegateCommon::UpdateClockType() { | 287 void SystemTrayDelegateCommon::UpdateClockType() { |
276 clock_type_ = (base::GetHourClockType() == base::k24HourClock) | 288 clock_type_ = (base::GetHourClockType() == base::k24HourClock) |
277 ? base::k24HourClock | 289 ? base::k24HourClock |
278 : base::k12HourClock; | 290 : base::k12HourClock; |
279 GetSystemTrayNotifier()->NotifyDateFormatChanged(); | 291 GetSystemTrayNotifier()->NotifyDateFormatChanged(); |
280 } | 292 } |
281 | 293 |
282 void SystemTrayDelegateCommon::Observe( | 294 void SystemTrayDelegateCommon::Observe( |
283 int type, | 295 int type, |
284 const content::NotificationSource& source, | 296 const content::NotificationSource& source, |
285 const content::NotificationDetails& details) { | 297 const content::NotificationDetails& details) { |
286 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { | 298 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { |
287 ash::UpdateInfo info; | 299 ash::UpdateInfo info; |
288 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); | 300 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); |
289 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); | 301 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); |
290 } else { | 302 } else { |
291 NOTREACHED(); | 303 NOTREACHED(); |
292 } | 304 } |
293 } | 305 } |
OLD | NEW |