| 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_notifier.h" | 7 #include "ash/common/system/tray/system_tray_notifier.h" |
| 8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 void SystemTrayController::ShowSettings() { | 21 void SystemTrayController::ShowSettings() { |
| 22 if (ConnectToSystemTrayClient()) | 22 if (ConnectToSystemTrayClient()) |
| 23 system_tray_client_->ShowSettings(); | 23 system_tray_client_->ShowSettings(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void SystemTrayController::ShowDateSettings() { | 26 void SystemTrayController::ShowDateSettings() { |
| 27 if (ConnectToSystemTrayClient()) | 27 if (ConnectToSystemTrayClient()) |
| 28 system_tray_client_->ShowDateSettings(); | 28 system_tray_client_->ShowDateSettings(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void SystemTrayController::ShowSetTimeDialog() { |
| 32 if (ConnectToSystemTrayClient()) |
| 33 system_tray_client_->ShowSetTimeDialog(); |
| 34 } |
| 35 |
| 31 void SystemTrayController::ShowDisplaySettings() { | 36 void SystemTrayController::ShowDisplaySettings() { |
| 32 if (ConnectToSystemTrayClient()) | 37 if (ConnectToSystemTrayClient()) |
| 33 system_tray_client_->ShowDisplaySettings(); | 38 system_tray_client_->ShowDisplaySettings(); |
| 34 } | 39 } |
| 35 | 40 |
| 36 void SystemTrayController::ShowPowerSettings() { | 41 void SystemTrayController::ShowPowerSettings() { |
| 37 if (ConnectToSystemTrayClient()) | 42 if (ConnectToSystemTrayClient()) |
| 38 system_tray_client_->ShowPowerSettings(); | 43 system_tray_client_->ShowPowerSettings(); |
| 39 } | 44 } |
| 40 | 45 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 void SystemTrayController::OnClientConnectionError() { | 130 void SystemTrayController::OnClientConnectionError() { |
| 126 system_tray_client_.reset(); | 131 system_tray_client_.reset(); |
| 127 } | 132 } |
| 128 | 133 |
| 129 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { | 134 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { |
| 130 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; | 135 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; |
| 131 WmShell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); | 136 WmShell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); |
| 132 } | 137 } |
| 133 | 138 |
| 134 } // namespace ash | 139 } // namespace ash |
| OLD | NEW |