| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 5 #ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
| 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 6 #define ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/system/user/login_status.h" | 12 #include "ash/system/user/login_status.h" |
| 13 #include "ash/volume_control_delegate.h" | 13 #include "ash/volume_control_delegate.h" |
| 14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/i18n/time_formatting.h" | 16 #include "base/i18n/time_formatting.h" |
| 17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
| 19 #include "ui/gfx/image/image_skia.h" | 19 #include "ui/gfx/image/image_skia.h" |
| 20 | 20 |
| 21 class AccountId; |
| 22 |
| 21 namespace base { | 23 namespace base { |
| 22 class TimeDelta; | 24 class TimeDelta; |
| 23 class TimeTicks; | 25 class TimeTicks; |
| 24 } | 26 } |
| 25 | 27 |
| 26 namespace ash { | 28 namespace ash { |
| 27 | 29 |
| 28 class CustodianInfoTrayObserver; | 30 class CustodianInfoTrayObserver; |
| 29 class ShutdownPolicyObserver; | 31 class ShutdownPolicyObserver; |
| 30 | 32 |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // The active user has been changed. This will be called when the UI is ready | 309 // The active user has been changed. This will be called when the UI is ready |
| 308 // to be switched to the new user. | 310 // to be switched to the new user. |
| 309 // Note: This will happen after SessionStateObserver::ActiveUserChanged fires. | 311 // Note: This will happen after SessionStateObserver::ActiveUserChanged fires. |
| 310 virtual void ActiveUserWasChanged(); | 312 virtual void ActiveUserWasChanged(); |
| 311 | 313 |
| 312 // Returns true when the Search key is configured to be treated as Caps Lock. | 314 // Returns true when the Search key is configured to be treated as Caps Lock. |
| 313 virtual bool IsSearchKeyMappedToCapsLock(); | 315 virtual bool IsSearchKeyMappedToCapsLock(); |
| 314 | 316 |
| 315 // Returns accounts delegate for given user. May return nullptr. | 317 // Returns accounts delegate for given user. May return nullptr. |
| 316 virtual tray::UserAccountsDelegate* GetUserAccountsDelegate( | 318 virtual tray::UserAccountsDelegate* GetUserAccountsDelegate( |
| 317 const std::string& user_id); | 319 const AccountId& account_id); |
| 318 | 320 |
| 319 // Adding observers that are notified when supervised info is being changed. | 321 // Adding observers that are notified when supervised info is being changed. |
| 320 virtual void AddCustodianInfoTrayObserver( | 322 virtual void AddCustodianInfoTrayObserver( |
| 321 CustodianInfoTrayObserver* observer); | 323 CustodianInfoTrayObserver* observer); |
| 322 | 324 |
| 323 virtual void RemoveCustodianInfoTrayObserver( | 325 virtual void RemoveCustodianInfoTrayObserver( |
| 324 CustodianInfoTrayObserver* observer); | 326 CustodianInfoTrayObserver* observer); |
| 325 | 327 |
| 326 // Adds an observer whose |OnShutdownPolicyChanged| function is called when | 328 // Adds an observer whose |OnShutdownPolicyChanged| function is called when |
| 327 // the |DeviceRebootOnShutdown| policy changes. If this policy is set to | 329 // the |DeviceRebootOnShutdown| policy changes. If this policy is set to |
| 328 // true, a device cannot be shut down anymore but only rebooted. | 330 // true, a device cannot be shut down anymore but only rebooted. |
| 329 virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer); | 331 virtual void AddShutdownPolicyObserver(ShutdownPolicyObserver* observer); |
| 330 | 332 |
| 331 virtual void RemoveShutdownPolicyObserver(ShutdownPolicyObserver* observer); | 333 virtual void RemoveShutdownPolicyObserver(ShutdownPolicyObserver* observer); |
| 332 | 334 |
| 333 // Determines whether the device is automatically rebooted when shut down as | 335 // Determines whether the device is automatically rebooted when shut down as |
| 334 // specified by the device policy |DeviceRebootOnShutdown|. This function | 336 // specified by the device policy |DeviceRebootOnShutdown|. This function |
| 335 // asynchronously calls |callback| once a trusted policy becomes available. | 337 // asynchronously calls |callback| once a trusted policy becomes available. |
| 336 virtual void ShouldRebootOnShutdown(const RebootOnShutdownCallback& callback); | 338 virtual void ShouldRebootOnShutdown(const RebootOnShutdownCallback& callback); |
| 337 | 339 |
| 338 // Returns VPNDelegate. May return nullptr. | 340 // Returns VPNDelegate. May return nullptr. |
| 339 virtual VPNDelegate* GetVPNDelegate() const; | 341 virtual VPNDelegate* GetVPNDelegate() const; |
| 340 }; | 342 }; |
| 341 | 343 |
| 342 } // namespace ash | 344 } // namespace ash |
| 343 | 345 |
| 344 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ | 346 #endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_DELEGATE_H_ |
| OLD | NEW |