| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 void SystemTrayController::ShowPaletteSettings() { | 70 void SystemTrayController::ShowPaletteSettings() { |
| 71 if (ConnectToSystemTrayClient()) | 71 if (ConnectToSystemTrayClient()) |
| 72 system_tray_client_->ShowPaletteSettings(); | 72 system_tray_client_->ShowPaletteSettings(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void SystemTrayController::ShowPublicAccountInfo() { | 75 void SystemTrayController::ShowPublicAccountInfo() { |
| 76 if (ConnectToSystemTrayClient()) | 76 if (ConnectToSystemTrayClient()) |
| 77 system_tray_client_->ShowPublicAccountInfo(); | 77 system_tray_client_->ShowPublicAccountInfo(); |
| 78 } | 78 } |
| 79 | 79 |
| 80 void SystemTrayController::ShowNetworkSettings(const std::string& network_id) { |
| 81 if (ConnectToSystemTrayClient()) |
| 82 system_tray_client_->ShowNetworkSettings(network_id); |
| 83 } |
| 84 |
| 80 void SystemTrayController::ShowProxySettings() { | 85 void SystemTrayController::ShowProxySettings() { |
| 81 if (ConnectToSystemTrayClient()) | 86 if (ConnectToSystemTrayClient()) |
| 82 system_tray_client_->ShowProxySettings(); | 87 system_tray_client_->ShowProxySettings(); |
| 83 } | 88 } |
| 84 | 89 |
| 85 void SystemTrayController::BindRequest(mojom::SystemTrayRequest request) { | 90 void SystemTrayController::BindRequest(mojom::SystemTrayRequest request) { |
| 86 bindings_.AddBinding(this, std::move(request)); | 91 bindings_.AddBinding(this, std::move(request)); |
| 87 } | 92 } |
| 88 | 93 |
| 89 bool SystemTrayController::ConnectToSystemTrayClient() { | 94 bool SystemTrayController::ConnectToSystemTrayClient() { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 118 void SystemTrayController::OnClientConnectionError() { | 123 void SystemTrayController::OnClientConnectionError() { |
| 119 system_tray_client_.reset(); | 124 system_tray_client_.reset(); |
| 120 } | 125 } |
| 121 | 126 |
| 122 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { | 127 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { |
| 123 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; | 128 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; |
| 124 WmShell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); | 129 WmShell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); |
| 125 } | 130 } |
| 126 | 131 |
| 127 } // namespace ash | 132 } // namespace ash |
| OLD | NEW |