Chromium Code Reviews| Index: chrome/browser/signin/easy_unlock_service_regular.h |
| diff --git a/chrome/browser/signin/easy_unlock_service_regular.h b/chrome/browser/signin/easy_unlock_service_regular.h |
| index 6b34afef928865ae1645806a167e58b3ba03188d..c748cd60654330f7eb01696678d32bf4030e004e 100644 |
| --- a/chrome/browser/signin/easy_unlock_service_regular.h |
| +++ b/chrome/browser/signin/easy_unlock_service_regular.h |
| @@ -11,11 +11,13 @@ |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/prefs/pref_change_registrar.h" |
| +#include "base/time/time.h" |
| #include "chrome/browser/signin/easy_unlock_service.h" |
| #include "chrome/browser/signin/screenlock_bridge.h" |
| #if defined(OS_CHROMEOS) |
| #include "chrome/browser/chromeos/login/easy_unlock/short_lived_user_context.h" |
| +#include "chromeos/dbus/power_manager_client.h" |
| #endif |
| namespace base { |
| @@ -38,6 +40,9 @@ class Profile; |
| // EasyUnlockService instance that should be used for regular, non-signin |
| // profiles. |
| class EasyUnlockServiceRegular : public EasyUnlockService, |
| +#if defined(OS_CHROMEOS) |
| + public chromeos::PowerManagerClient::Observer, |
|
Tim Song
2015/03/25 18:17:28
The base class has a similar observer in EasyUnloc
Ilya Sherman
2015/04/01 00:16:13
Done.
|
| +#endif |
| public ScreenlockBridge::Observer { |
| public: |
| explicit EasyUnlockServiceRegular(Profile* profile); |
| @@ -75,6 +80,11 @@ class EasyUnlockServiceRegular : public EasyUnlockService, |
| ScreenlockBridge::LockHandler::ScreenType screen_type) override; |
| void OnFocusedUserChanged(const std::string& user_id) override; |
| +#if defined(OS_CHROMEOS) |
| + // chromeos::PowerManagerClient::Observer implementation: |
| + void SuspendDone(const base::TimeDelta& sleep_duration) override; |
| +#endif // defined(OS_CHROMEOS) |
| + |
| // Callback when the controlling pref changes. |
| void OnPrefsChanged(); |
| @@ -116,6 +126,12 @@ class EasyUnlockServiceRegular : public EasyUnlockService, |
| // password-based unlocks for metrics. |
| bool will_unlock_using_easy_unlock_; |
| + // The timestamp for the most recent time when the lock screen was shown. The |
| + // lock screen is typically shown when the user awakens her computer from |
| + // sleep -- e.g. by opening the lid -- but can also be shown if the screen is |
| + // locked but the computer does not go to sleep. |
| + base::TimeTicks lock_screen_last_shown_timestamp_; |
| + |
| base::WeakPtrFactory<EasyUnlockServiceRegular> weak_ptr_factory_; |
| DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceRegular); |