| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ | 6 #define CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // Attempts to login the user using an easy unlock key. | 133 // Attempts to login the user using an easy unlock key. |
| 134 virtual void AttemptEasySignin(const std::string& user_email, | 134 virtual void AttemptEasySignin(const std::string& user_email, |
| 135 const std::string& secret, | 135 const std::string& secret, |
| 136 const std::string& key_label) = 0; | 136 const std::string& key_label) = 0; |
| 137 | 137 |
| 138 protected: | 138 protected: |
| 139 virtual ~LockHandler() {} | 139 virtual ~LockHandler() {} |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 static ScreenlockBridge* Get(); | 142 static ScreenlockBridge* Get(); |
| 143 static std::string GetAuthenticatedUserEmail(Profile* profile); | 143 static std::string GetAuthenticatedUserEmail(const Profile* profile); |
| 144 | 144 |
| 145 void SetLockHandler(LockHandler* lock_handler); | 145 void SetLockHandler(LockHandler* lock_handler); |
| 146 void SetFocusedUser(const std::string& user_id); | 146 void SetFocusedUser(const std::string& user_id); |
| 147 | 147 |
| 148 bool IsLocked() const; | 148 bool IsLocked() const; |
| 149 void Lock(Profile* profile); | 149 void Lock(Profile* profile); |
| 150 void Unlock(Profile* profile); | 150 void Unlock(Profile* profile); |
| 151 | 151 |
| 152 void AddObserver(Observer* observer); | 152 void AddObserver(Observer* observer); |
| 153 void RemoveObserver(Observer* observer); | 153 void RemoveObserver(Observer* observer); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 165 | 165 |
| 166 LockHandler* lock_handler_; // Not owned | 166 LockHandler* lock_handler_; // Not owned |
| 167 // The last focused user's id. | 167 // The last focused user's id. |
| 168 std::string focused_user_id_; | 168 std::string focused_user_id_; |
| 169 ObserverList<Observer, true> observers_; | 169 ObserverList<Observer, true> observers_; |
| 170 | 170 |
| 171 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 171 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 #endif // CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ | 174 #endif // CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
| OLD | NEW |