| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/common/system/tray/system_tray_controller.h" | 5 #include "ash/common/system/tray/system_tray_controller.h" |
| 6 | 6 |
| 7 #include "ash/common/system/tray/system_tray.h" | 7 #include "ash/common/system/tray/system_tray.h" |
| 8 #include "ash/common/system/tray/system_tray_notifier.h" | 8 #include "ash/common/system/tray/system_tray_notifier.h" |
| 9 #include "ash/common/system/update/tray_update.h" | 9 #include "ash/common/system/update/tray_update.h" |
| 10 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 11 #include "ash/common/wm_window.h" | 11 #include "ash/common/wm_window.h" |
| 12 #include "ash/root_window_controller.h" | 12 #include "ash/root_window_controller.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 | 15 |
| 16 SystemTrayController::SystemTrayController() | 16 SystemTrayController::SystemTrayController() |
| 17 : hour_clock_type_(base::GetHourClockType()) {} | 17 : hour_clock_type_(base::GetHourClockType()) {} |
| 18 | 18 |
| 19 SystemTrayController::~SystemTrayController() {} | 19 SystemTrayController::~SystemTrayController() {} |
| 20 | 20 |
| 21 void SystemTrayController::ShowSettings() { | 21 void SystemTrayController::ShowSettings() { |
| 22 if (system_tray_client_) | 22 if (system_tray_client_) |
| 23 system_tray_client_->ShowSettings(); | 23 system_tray_client_->ShowSettings(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void SystemTrayController::ShowBluetoothSettings() { |
| 27 if (system_tray_client_) |
| 28 system_tray_client_->ShowBluetoothSettings(); |
| 29 } |
| 30 |
| 26 void SystemTrayController::ShowDateSettings() { | 31 void SystemTrayController::ShowDateSettings() { |
| 27 if (system_tray_client_) | 32 if (system_tray_client_) |
| 28 system_tray_client_->ShowDateSettings(); | 33 system_tray_client_->ShowDateSettings(); |
| 29 } | 34 } |
| 30 | 35 |
| 31 void SystemTrayController::ShowSetTimeDialog() { | 36 void SystemTrayController::ShowSetTimeDialog() { |
| 32 if (system_tray_client_) | 37 if (system_tray_client_) |
| 33 system_tray_client_->ShowSetTimeDialog(); | 38 system_tray_client_->ShowSetTimeDialog(); |
| 34 } | 39 } |
| 35 | 40 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) { | 177 for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) { |
| 173 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); | 178 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); |
| 174 // External monitors might not have a tray yet. | 179 // External monitors might not have a tray yet. |
| 175 if (!tray) | 180 if (!tray) |
| 176 continue; | 181 continue; |
| 177 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required); | 182 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required); |
| 178 } | 183 } |
| 179 } | 184 } |
| 180 | 185 |
| 181 } // namespace ash | 186 } // namespace ash |
| OLD | NEW |