Index: components/signin/content/screenlock_bridge.h |
diff --git a/chrome/browser/signin/screenlock_bridge.h b/components/signin/content/screenlock_bridge.h |
similarity index 89% |
rename from chrome/browser/signin/screenlock_bridge.h |
rename to components/signin/content/screenlock_bridge.h |
index d376f68ccbd18b2b8fc62aed93c37f3d27e790a2..f375f5c83b932d8e5a6c4b1eabc8acb733ec0976 100644 |
--- a/chrome/browser/signin/screenlock_bridge.h |
+++ b/components/signin/content/screenlock_bridge.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
-#define CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
+#ifndef COMPONENTS_SIGNIN_CONTENT_SCREENLOCK_BRIDGE_H_ |
+#define COMPONENTS_SIGNIN_CONTENT_SCREENLOCK_BRIDGE_H_ |
#include <string> |
@@ -15,8 +15,9 @@ |
#include "base/strings/string16.h" |
#include "base/values.h" |
- |
-class Profile; |
+namespace content { |
+class BrowserContext; |
+} // namespace content |
// ScreenlockBridge brings together the screenLockPrivate API and underlying |
// support. On ChromeOS, it delegates calls to the ScreenLocker. On other |
@@ -99,11 +100,7 @@ class ScreenlockBridge { |
FORCE_OFFLINE_PASSWORD = 5 |
}; |
- enum ScreenType { |
- SIGNIN_SCREEN = 0, |
- LOCK_SCREEN = 1, |
- OTHER_SCREEN = 2 |
- }; |
+ enum ScreenType { SIGNIN_SCREEN = 0, LOCK_SCREEN = 1, OTHER_SCREEN = 2 }; |
// Displays |message| in a banner on the lock screen. |
virtual void ShowBannerMessage(const base::string16& message) = 0; |
@@ -130,6 +127,12 @@ class ScreenlockBridge { |
// Returns the type of the screen -- a signin or a lock screen. |
virtual ScreenType GetScreenType() const = 0; |
+ // Lock the screen for |browser_context|. |
+ virtual void Lock(content::BrowserContext* browser_context) = 0; |
+ |
+ // Unlock from easy unlock for |browser_context|. |
+ virtual void Unlock(content::BrowserContext* browser_context) = 0; |
+ |
// Unlock from easy unlock app for a user. |
virtual void Unlock(const std::string& user_email) = 0; |
@@ -158,14 +161,13 @@ class ScreenlockBridge { |
}; |
static ScreenlockBridge* Get(); |
- static std::string GetAuthenticatedUserEmail(const Profile* profile); |
void SetLockHandler(LockHandler* lock_handler); |
void SetFocusedUser(const std::string& user_id); |
bool IsLocked() const; |
- void Lock(Profile* profile); |
- void Unlock(Profile* profile); |
+ void Lock(content::BrowserContext* browser_context); |
+ void Unlock(content::BrowserContext* browser_context); |
void AddObserver(Observer* observer); |
void RemoveObserver(Observer* observer); |
@@ -189,4 +191,4 @@ class ScreenlockBridge { |
DISALLOW_COPY_AND_ASSIGN(ScreenlockBridge); |
}; |
-#endif // CHROME_BROWSER_SIGNIN_SCREENLOCK_BRIDGE_H_ |
+#endif // COMPONENTS_SIGNIN_CONTENT_SCREENLOCK_BRIDGE_H_ |