Chromium Code Reviews| 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 228865b388c2757e1dab99596e0d8d72b241e164..eabb1257b2ce1542e81f54d407767d9422bc2cd7 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(); |
| @@ -98,6 +99,8 @@ typedef std::vector<IMEInfo> IMEInfoList; |
| class VolumeControlDelegate; |
| +using RebootOnShutdownCallback = base::Callback<void(bool)>; |
|
stevenjb
2014/12/17 19:09:02
Update other typedefs in this header to 'using'
cschuet (SLOW)
2015/01/07 14:37:07
Done.
|
| + |
| namespace tray { |
| class UserAccountsDelegate; |
| } // namespace tray |
| @@ -199,6 +202,9 @@ class ASH_EXPORT SystemTrayDelegate { |
| // Shows login UI to add other users to this session. |
| virtual void ShowUserLogin() = 0; |
| + // Attempts to reboot the system. |
|
stevenjb
2014/12/17 19:09:02
restart
cschuet (SLOW)
2015/01/07 14:37:07
This function has been removed in the new version
|
| + virtual void Restart() = 0; |
| + |
| // Attempts to shut down the system. |
| virtual void ShutDown() = 0; |
| @@ -297,6 +303,21 @@ 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; |
| + |
| + // Determines whether the device is automatically rebooted when shut down as |
| + // specified by the device policy |DeviceRebootOnShutdown|. This function |
| + // asynchronously calls |RebootOnShutdownCallback| once a trusted policy |
|
stevenjb
2014/12/17 19:09:02
Use variable name |callback| instead of type.
cschuet (SLOW)
2015/01/07 14:37:07
Done.
|
| + // becomes available. |
| + virtual void ShouldRebootOnShutdown( |
| + const RebootOnShutdownCallback& callback) = 0; |
|
stevenjb
2014/12/17 19:09:02
This should be named something like 'RequestShould
cschuet (SLOW)
2015/01/07 14:37:07
ShouldRebootOnShutdown is supposed to sound like a
|
| + |
| + virtual void RemoveShutdownPolicyObserver( |
|
stevenjb
2014/12/17 19:09:02
Remove should follow Add here and elsewhere.
cschuet (SLOW)
2015/01/07 14:37:07
Done.
|
| + ShutdownPolicyObserver* observer) = 0; |
| }; |
| } // namespace ash |