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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_common.cc

Issue 811033002: Add device policy to disallow shutdown - ash UI modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reduced scope of CL (ash only now, removed webui changes) Created 5 years, 11 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
OLDNEW
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void SystemTrayDelegateCommon::ShowSupervisedUserInfo() { 150 void SystemTrayDelegateCommon::ShowSupervisedUserInfo() {
151 } 151 }
152 152
153 void SystemTrayDelegateCommon::ShowEnterpriseInfo() { 153 void SystemTrayDelegateCommon::ShowEnterpriseInfo() {
154 } 154 }
155 155
156 void SystemTrayDelegateCommon::ShowUserLogin() { 156 void SystemTrayDelegateCommon::ShowUserLogin() {
157 } 157 }
158 158
159 void SystemTrayDelegateCommon::ShutDown() {
160 }
161
162 void SystemTrayDelegateCommon::SignOut() { 159 void SystemTrayDelegateCommon::SignOut() {
163 } 160 }
164 161
165 void SystemTrayDelegateCommon::RequestLockScreen() { 162 void SystemTrayDelegateCommon::RequestLockScreen() {
166 } 163 }
167 164
168 void SystemTrayDelegateCommon::RequestRestartForUpdate() { 165 void SystemTrayDelegateCommon::RequestRestartForUpdate() {
169 chrome::AttemptRestart(); 166 chrome::AttemptRestart();
170 } 167 }
171 168
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 261 }
265 262
266 void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver( 263 void SystemTrayDelegateCommon::AddCustodianInfoTrayObserver(
267 ash::CustodianInfoTrayObserver* observer) { 264 ash::CustodianInfoTrayObserver* observer) {
268 } 265 }
269 266
270 void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver( 267 void SystemTrayDelegateCommon::RemoveCustodianInfoTrayObserver(
271 ash::CustodianInfoTrayObserver* observer) { 268 ash::CustodianInfoTrayObserver* observer) {
272 } 269 }
273 270
271 void SystemTrayDelegateCommon::AddShutdownPolicyObserver(
272 ash::ShutdownPolicyObserver* observer) {
273 }
274
275 void SystemTrayDelegateCommon::RemoveShutdownPolicyObserver(
276 ash::ShutdownPolicyObserver* observer) {
277 }
278
279 void SystemTrayDelegateCommon::ShouldRebootOnShutdown(
280 const ash::RebootOnShutdownCallback& callback) {
281 }
282
274 ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() { 283 ash::SystemTrayNotifier* SystemTrayDelegateCommon::GetSystemTrayNotifier() {
275 return ash::Shell::GetInstance()->system_tray_notifier(); 284 return ash::Shell::GetInstance()->system_tray_notifier();
276 } 285 }
277 286
278 void SystemTrayDelegateCommon::UpdateClockType() { 287 void SystemTrayDelegateCommon::UpdateClockType() {
279 clock_type_ = (base::GetHourClockType() == base::k24HourClock) 288 clock_type_ = (base::GetHourClockType() == base::k24HourClock)
280 ? base::k24HourClock 289 ? base::k24HourClock
281 : base::k12HourClock; 290 : base::k12HourClock;
282 GetSystemTrayNotifier()->NotifyDateFormatChanged(); 291 GetSystemTrayNotifier()->NotifyDateFormatChanged();
283 } 292 }
284 293
285 void SystemTrayDelegateCommon::Observe( 294 void SystemTrayDelegateCommon::Observe(
286 int type, 295 int type,
287 const content::NotificationSource& source, 296 const content::NotificationSource& source,
288 const content::NotificationDetails& details) { 297 const content::NotificationDetails& details) {
289 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) { 298 if (type == chrome::NOTIFICATION_UPGRADE_RECOMMENDED) {
290 ash::UpdateInfo info; 299 ash::UpdateInfo info;
291 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info); 300 GetUpdateInfo(content::Source<UpgradeDetector>(source).ptr(), &info);
292 GetSystemTrayNotifier()->NotifyUpdateRecommended(info); 301 GetSystemTrayNotifier()->NotifyUpdateRecommended(info);
293 } else { 302 } else {
294 NOTREACHED(); 303 NOTREACHED();
295 } 304 }
296 } 305 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698