| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 260 } |
| 261 | 261 |
| 262 void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver( | 262 void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver( |
| 263 ash::CustodianInfoTrayObserver* observer) { | 263 ash::CustodianInfoTrayObserver* observer) { |
| 264 } | 264 } |
| 265 | 265 |
| 266 void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver( | 266 void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver( |
| 267 ash::CustodianInfoTrayObserver* observer) { | 267 ash::CustodianInfoTrayObserver* observer) { |
| 268 } | 268 } |
| 269 | 269 |
| 270 void SystemTrayDelegateCommon::AddShutdownPolicyObserver( |
| 271 ash::ShutdownPolicyObserver* observer) { |
| 272 } |
| 273 |
| 274 void SystemTrayDelegateCommon::ShouldRebootOnShutdown( |
| 275 const ash::RebootOnShutdownCallback& callback) { |
| 276 } |
| 277 |
| 278 void SystemTrayDelegateCommon::RemoveShutdownPolicyObserver( |
| 279 ash::ShutdownPolicyObserver* observer) { |
| 280 } |
| 281 |
| 270 ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() { | 282 ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() { |
| 271 return ash::Shell::GetInstance()->system_tray_notifier(); | 283 return ash::Shell::GetInstance()->system_tray_notifier(); |
| 272 } | 284 } |
| 273 | 285 |
| 274 void SystemTrayDelegateCommon::UpdateClockType() { | 286 void SystemTrayDelegateCommon::UpdateClockType() { |
| 275 clock_type_ = (base::GetHourClockType() == base::k24HourClock) | 287 clock_type_ = (base::GetHourClockType() == base::k24HourClock) |
| 276 ? base::k24HourClock | 288 ? base::k24HourClock |
| 277 : base::k12HourClock; | 289 : base::k12HourClock; |
| 278 GetSystemTrayNotifier()->NotifyDateFormatChanged(); | 290 GetSystemTrayNotifier()->NotifyDateFormatChanged(); |
| 279 } | 291 } |
| 280 | 292 |
| 281 void SystemTrayDelegateCommon::Observe( | 293 void SystemTrayDelegateCommon::Observe( |
| 282 int type, | 294 int type, |
| 283 const content::NotificationSource& source, | 295 const content::NotificationSource& source, |
| 284 const content::NotificationDetails& details) { | 296 const content::NotificationDetails& details) { |
| 285 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { | 297 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { |
| 286 ash::UpdateInfo info; | 298 ash::UpdateInfo info; |
| 287 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); | 299 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); |
| 288 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); | 300 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); |
| 289 } else { | 301 } else { |
| 290 NOTREACHED(); | 302 NOTREACHED(); |
| 291 } | 303 } |
| 292 } | 304 } |
| OLD | NEW |