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

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

Issue 2492063002: chromeos: Simplify ShutdownPolicyHandler
Patch Set: rebase Created 4 years, 1 month 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 void SystemTrayDelegateChromeOS::AddShutdownPolicyObserver( 602 void SystemTrayDelegateChromeOS::AddShutdownPolicyObserver(
603 ash::ShutdownPolicyObserver* observer) { 603 ash::ShutdownPolicyObserver* observer) {
604 shutdown_policy_observers_.AddObserver(observer); 604 shutdown_policy_observers_.AddObserver(observer);
605 } 605 }
606 606
607 void SystemTrayDelegateChromeOS::RemoveShutdownPolicyObserver( 607 void SystemTrayDelegateChromeOS::RemoveShutdownPolicyObserver(
608 ash::ShutdownPolicyObserver* observer) { 608 ash::ShutdownPolicyObserver* observer) {
609 shutdown_policy_observers_.RemoveObserver(observer); 609 shutdown_policy_observers_.RemoveObserver(observer);
610 } 610 }
611 611
612 void SystemTrayDelegateChromeOS::ShouldRebootOnShutdown( 612 void SystemTrayDelegateChromeOS::CheckIfRebootOnShutdown() {
613 const ash::RebootOnShutdownCallback& callback) { 613 shutdown_policy_handler_->CheckIfRebootOnShutdown();
614 shutdown_policy_handler_->CheckIfRebootOnShutdown(callback);
615 } 614 }
616 615
617 ash::VPNDelegate* SystemTrayDelegateChromeOS::GetVPNDelegate() const { 616 ash::VPNDelegate* SystemTrayDelegateChromeOS::GetVPNDelegate() const {
618 return vpn_delegate_.get(); 617 return vpn_delegate_.get();
619 } 618 }
620 619
621 std::unique_ptr<ash::SystemTrayItem> 620 std::unique_ptr<ash::SystemTrayItem>
622 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) { 621 SystemTrayDelegateChromeOS::CreateRotationLockTrayItem(ash::SystemTray* tray) {
623 return base::MakeUnique<ash::TrayRotationLock>(tray); 622 return base::MakeUnique<ash::TrayRotationLock>(tray);
624 } 623 }
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while " 1066 LOG(WARNING) << "SystemTrayDelegateChromeOS::GetChildUserMessage call while "
1068 << "ENABLE_SUPERVISED_USERS undefined."; 1067 << "ENABLE_SUPERVISED_USERS undefined.";
1069 return base::string16(); 1068 return base::string16();
1070 } 1069 }
1071 1070
1072 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1071 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1073 return new SystemTrayDelegateChromeOS(); 1072 return new SystemTrayDelegateChromeOS();
1074 } 1073 }
1075 1074
1076 } // namespace chromeos 1075 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_chromeos.h ('k') | chrome/browser/ui/webui/chromeos/login/oobe_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698