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

Unified Diff: ash/system/tray/system_tray_delegate.h

Issue 811033002: Add device policy to disallow shutdown - ash UI modifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/tray/default_system_tray_delegate.cc ('k') | ash/test/test_lock_state_controller_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_delegate.h
diff --git a/ash/system/tray/system_tray_delegate.h b/ash/system/tray/system_tray_delegate.h
index 01b0de3557c36c81cbdc3bb9ba3d3fcd4781d6d9..ac98951b81060c3360db1961e9cdf5e8b8a1f731 100644
--- a/ash/system/tray/system_tray_delegate.h
+++ b/ash/system/tray/system_tray_delegate.h
@@ -25,6 +25,7 @@ class TimeTicks;
namespace ash {
class CustodianInfoTrayObserver;
+class ShutdownPolicyObserver;
struct ASH_EXPORT NetworkIconInfo {
NetworkIconInfo();
@@ -53,7 +54,7 @@ struct ASH_EXPORT BluetoothDeviceInfo {
bool paired;
};
-typedef std::vector<BluetoothDeviceInfo> BluetoothDeviceList;
+using BluetoothDeviceList = std::vector<BluetoothDeviceInfo>;
struct ASH_EXPORT IMEPropertyInfo {
IMEPropertyInfo();
@@ -64,7 +65,7 @@ struct ASH_EXPORT IMEPropertyInfo {
base::string16 name;
};
-typedef std::vector<IMEPropertyInfo> IMEPropertyInfoList;
+using IMEPropertyInfoList = std::vector<IMEPropertyInfo>;
struct ASH_EXPORT IMEInfo {
IMEInfo();
@@ -94,10 +95,12 @@ struct ASH_EXPORT UpdateInfo {
bool factory_reset_required;
};
-typedef std::vector<IMEInfo> IMEInfoList;
+using IMEInfoList = std::vector<IMEInfo>;
class VolumeControlDelegate;
+using RebootOnShutdownCallback = base::Callback<void(bool)>;
+
namespace tray {
class UserAccountsDelegate;
} // namespace tray
@@ -300,6 +303,20 @@ class ASH_EXPORT SystemTrayDelegate {
virtual void RemoveCustodianInfoTrayObserver(
CustodianInfoTrayObserver* observer) = 0;
+
+ // Adds an observer whose |OnShutdownPolicyChanged| function is called when
+ // the |DeviceRebootOnShutdown| policy changes. If this policy is set to
+ // true, a device cannot be shut down anymore but only rebooted.
+ virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer) = 0;
+
+ virtual void RemoveShutdownPolicyObserver(
+ ShutdownPolicyObserver* observer) = 0;
+
+ // Determines whether the device is automatically rebooted when shut down as
+ // specified by the device policy |DeviceRebootOnShutdown|. This function
+ // asynchronously calls |callback| once a trusted policy becomes available.
+ virtual void ShouldRebootOnShutdown(
+ const RebootOnShutdownCallback& callback) = 0;
};
} // namespace ash
« no previous file with comments | « ash/system/tray/default_system_tray_delegate.cc ('k') | ash/test/test_lock_state_controller_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698