| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 virtual void OnScreenDidUnlock(LockHandler::ScreenType screen_type) = 0; | 145 virtual void OnScreenDidUnlock(LockHandler::ScreenType screen_type) = 0; |
| 146 | 146 |
| 147 // Invoked when the user focused on the lock screen changes. | 147 // Invoked when the user focused on the lock screen changes. |
| 148 virtual void OnFocusedUserChanged(const std::string& user_id) = 0; | 148 virtual void OnFocusedUserChanged(const std::string& user_id) = 0; |
| 149 | 149 |
| 150 protected: | 150 protected: |
| 151 virtual ~Observer() {} | 151 virtual ~Observer() {} |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 static ScreenlockBridge* Get(); | 154 static ScreenlockBridge* Get(); |
| 155 static std::string GetAuthenticatedUserEmail(Profile* profile); | 155 static std::string GetAuthenticatedUserEmail(const Profile* profile); |
| 156 | 156 |
| 157 void SetLockHandler(LockHandler* lock_handler); | 157 void SetLockHandler(LockHandler* lock_handler); |
| 158 void SetFocusedUser(const std::string& user_id); | 158 void SetFocusedUser(const std::string& user_id); |
| 159 | 159 |
| 160 bool IsLocked() const; | 160 bool IsLocked() const; |
| 161 void Lock(Profile* profile); | 161 void Lock(Profile* profile); |
| 162 void Unlock(Profile* profile); | 162 void Unlock(Profile* profile); |
| 163 | 163 |
| 164 void AddObserver(Observer* observer); | 164 void AddObserver(Observer* observer); |
| 165 void RemoveObserver(Observer* observer); | 165 void RemoveObserver(Observer* observer); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 177 | 177 |
| 178 LockHandler* lock_handler_; // Not owned | 178 LockHandler* lock_handler_; // Not owned |
| 179 // The last focused user's id. | 179 // The last focused user's id. |
| 180 std::string focused_user_id_; | 180 std::string focused_user_id_; |
| 181 ObserverList<Observer, true> observers_; | 181 ObserverList<Observer, true> observers_; |
| 182 | 182 |
| 183 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); | 183 DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 #endif // CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ | 186 #endif // CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
| OLD | NEW |