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

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

Issue 811283003: Clean-up of the system shutdown code paths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alignment fixes, rebase 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 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 if (show_intro) { 589 if (show_intro) {
590 base::Callback<void(bool)> on_accept = 590 base::Callback<void(bool)> on_accept =
591 base::Bind(&OnAcceptMultiprofilesIntro); 591 base::Bind(&OnAcceptMultiprofilesIntro);
592 ShowMultiprofilesIntroDialog(on_accept); 592 ShowMultiprofilesIntroDialog(on_accept);
593 } else { 593 } else {
594 UserAddingScreen::Get()->Start(); 594 UserAddingScreen::Get()->Start();
595 } 595 }
596 } 596 }
597 } 597 }
598 598
599 void SystemTrayDelegateChromeOS::ShutDown() {
600 ash::Shell::GetInstance()->lock_state_controller()->RequestShutdown(
601 ash::LockStateController::POWER_OFF);
602 }
603
604 void SystemTrayDelegateChromeOS::SignOut() { 599 void SystemTrayDelegateChromeOS::SignOut() {
605 chrome::AttemptUserExit(); 600 chrome::AttemptUserExit();
606 } 601 }
607 602
608 void SystemTrayDelegateChromeOS::RequestLockScreen() { 603 void SystemTrayDelegateChromeOS::RequestLockScreen() {
609 // TODO(antrim) : additional logging for crbug/173178 604 // TODO(antrim) : additional logging for crbug/173178
610 LOG(WARNING) << "Requesting screen lock from AshSystemTrayDelegate"; 605 LOG(WARNING) << "Requesting screen lock from AshSystemTrayDelegate";
611 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); 606 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
612 } 607 }
613 608
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1352 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1358 << "ENABLE_SUPERVISED_USERS undefined."; 1353 << "ENABLE_SUPERVISED_USERS undefined.";
1359 return base::string16(); 1354 return base::string16();
1360 } 1355 }
1361 1356
1362 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1357 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1363 return new SystemTrayDelegateChromeOS(); 1358 return new SystemTrayDelegateChromeOS();
1364 } 1359 }
1365 1360
1366 } // namespace chromeos 1361 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/ash/system_tray_delegate_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698