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

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

Issue 776093004: Add device policy to disallow shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modifications suggested by stevenjb Created 6 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 base::Callback<void(bool)> on_accept = 585 base::Callback<void(bool)> on_accept =
586 base::Bind(&OnAcceptMultiprofilesIntro); 586 base::Bind(&OnAcceptMultiprofilesIntro);
587 ShowMultiprofilesIntroDialog(on_accept); 587 ShowMultiprofilesIntroDialog(on_accept);
588 } else { 588 } else {
589 UserAddingScreen::Get()->Start(); 589 UserAddingScreen::Get()->Start();
590 } 590 }
591 } 591 }
592 } 592 }
593 593
594 void SystemTrayDelegateChromeOS::ShutDown() { 594 void SystemTrayDelegateChromeOS::ShutDown() {
595 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(); 595 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(
596 ash::LockStateController::POWER_OFF);
596 } 597 }
597 598
598 void SystemTrayDelegateChromeOS::SignOut() { 599 void SystemTrayDelegateChromeOS::SignOut() {
599 chrome::AttemptUserExit(); 600 chrome::AttemptUserExit();
600 } 601 }
601 602
602 void SystemTrayDelegateChromeOS::RequestLockScreen() { 603 void SystemTrayDelegateChromeOS::RequestLockScreen() {
603 // TODO(antrim) : additional logging for crbug/173178 604 // TODO(antrim) : additional logging for crbug/173178
604 LOG(WARNING) << "Requesting screen lock from AshSystemTrayDelegate"; 605 LOG(WARNING) << "Requesting screen lock from AshSystemTrayDelegate";
605 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); 606 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 accessibility_subscription_.reset(); 1292 accessibility_subscription_.reset();
1292 else 1293 else
1293 OnAccessibilityModeChanged(details.notify); 1294 OnAccessibilityModeChanged(details.notify);
1294 } 1295 }
1295 1296
1296 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1297 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1297 return new SystemTrayDelegateChromeOS(); 1298 return new SystemTrayDelegateChromeOS();
1298 } 1299 }
1299 1300
1300 } // namespace chromeos 1301 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698