Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Side by Side Diff: ash/system/tray/system_tray_controller.cc

Issue 2839043004: chromeos: Refactor ash SystemTrayDelegate enterprise methods to mojo (Closed)
Patch Set: review comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/system/tray/system_tray_controller.h ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/system/tray/system_tray_controller.h" 5 #include "ash/system/tray/system_tray_controller.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_port.h" 9 #include "ash/shell_port.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void SystemTrayController::ShowPaletteSettings() { 93 void SystemTrayController::ShowPaletteSettings() {
94 if (system_tray_client_) 94 if (system_tray_client_)
95 system_tray_client_->ShowPaletteSettings(); 95 system_tray_client_->ShowPaletteSettings();
96 } 96 }
97 97
98 void SystemTrayController::ShowPublicAccountInfo() { 98 void SystemTrayController::ShowPublicAccountInfo() {
99 if (system_tray_client_) 99 if (system_tray_client_)
100 system_tray_client_->ShowPublicAccountInfo(); 100 system_tray_client_->ShowPublicAccountInfo();
101 } 101 }
102 102
103 void SystemTrayController::ShowEnterpriseInfo() {
104 if (system_tray_client_)
105 system_tray_client_->ShowEnterpriseInfo();
106 }
107
103 void SystemTrayController::ShowNetworkConfigure(const std::string& network_id) { 108 void SystemTrayController::ShowNetworkConfigure(const std::string& network_id) {
104 if (system_tray_client_) 109 if (system_tray_client_)
105 system_tray_client_->ShowNetworkConfigure(network_id); 110 system_tray_client_->ShowNetworkConfigure(network_id);
106 } 111 }
107 112
108 void SystemTrayController::ShowNetworkCreate(const std::string& type) { 113 void SystemTrayController::ShowNetworkCreate(const std::string& type) {
109 if (system_tray_client_) 114 if (system_tray_client_)
110 system_tray_client_->ShowNetworkCreate(type); 115 system_tray_client_->ShowNetworkCreate(type);
111 } 116 }
112 117
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } else { 181 } else {
177 tray->GetWidget()->Hide(); 182 tray->GetWidget()->Hide();
178 } 183 }
179 } 184 }
180 185
181 void SystemTrayController::SetUse24HourClock(bool use_24_hour) { 186 void SystemTrayController::SetUse24HourClock(bool use_24_hour) {
182 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock; 187 hour_clock_type_ = use_24_hour ? base::k24HourClock : base::k12HourClock;
183 Shell::Get()->system_tray_notifier()->NotifyDateFormatChanged(); 188 Shell::Get()->system_tray_notifier()->NotifyDateFormatChanged();
184 } 189 }
185 190
191 void SystemTrayController::SetEnterpriseDomain(
192 const std::string& enterprise_domain,
193 bool active_directory_managed) {
194 enterprise_domain_ = enterprise_domain;
195 active_directory_managed_ = active_directory_managed;
196 Shell::Get()->system_tray_notifier()->NotifyEnterpriseDomainChanged();
197 }
198
186 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity, 199 void SystemTrayController::ShowUpdateIcon(mojom::UpdateSeverity severity,
187 bool factory_reset_required, 200 bool factory_reset_required,
188 mojom::UpdateType update_type) { 201 mojom::UpdateType update_type) {
189 // Show the icon on all displays. 202 // Show the icon on all displays.
190 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) { 203 for (WmWindow* root : ShellPort::Get()->GetAllRootWindows()) {
191 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray(); 204 ash::SystemTray* tray = root->GetRootWindowController()->GetSystemTray();
192 // External monitors might not have a tray yet. 205 // External monitors might not have a tray yet.
193 if (!tray) 206 if (!tray)
194 continue; 207 continue;
195 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required, 208 tray->tray_update()->ShowUpdateIcon(severity, factory_reset_required,
196 update_type); 209 update_type);
197 } 210 }
198 } 211 }
199 212
200 } // namespace ash 213 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_controller.h ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698