| Index: chrome/browser/signin/signin_screen_bridge.cc
|
| diff --git a/chrome/browser/signin/screenlock_bridge.cc b/chrome/browser/signin/signin_screen_bridge.cc
|
| similarity index 71%
|
| rename from chrome/browser/signin/screenlock_bridge.cc
|
| rename to chrome/browser/signin/signin_screen_bridge.cc
|
| index 17d676b5668c0d65c26ae43c25a1eef161840b7e..53e9ce1bd67d8e5bb6c6bc0124c0eb51a46c132a 100644
|
| --- a/chrome/browser/signin/screenlock_bridge.cc
|
| +++ b/chrome/browser/signin/signin_screen_bridge.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/signin/screenlock_bridge.h"
|
| +#include "chrome/browser/signin/signin_screen_bridge.h"
|
|
|
| #include "base/logging.h"
|
| #include "base/strings/string16.h"
|
| @@ -17,17 +17,17 @@
|
|
|
| namespace {
|
|
|
| -base::LazyInstance<ScreenlockBridge> g_screenlock_bridge_bridge_instance =
|
| +base::LazyInstance<SigninScreenBridge> g_signin_screen_bridge_bridge_instance =
|
| LAZY_INSTANCE_INITIALIZER;
|
|
|
| } // namespace
|
|
|
| // static
|
| -ScreenlockBridge* ScreenlockBridge::Get() {
|
| - return g_screenlock_bridge_bridge_instance.Pointer();
|
| +SigninScreenBridge* SigninScreenBridge::Get() {
|
| + return g_signin_screen_bridge_bridge_instance.Pointer();
|
| }
|
|
|
| -ScreenlockBridge::UserPodCustomIconOptions::UserPodCustomIconOptions()
|
| +SigninScreenBridge::UserPodCustomIconOptions::UserPodCustomIconOptions()
|
| : width_(0u),
|
| height_(0u),
|
| animation_set_(false),
|
| @@ -38,10 +38,10 @@ ScreenlockBridge::UserPodCustomIconOptions::UserPodCustomIconOptions()
|
| hardlock_on_click_(false) {
|
| }
|
|
|
| -ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() {}
|
| +SigninScreenBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() {}
|
|
|
| scoped_ptr<base::DictionaryValue>
|
| -ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
|
| +SigninScreenBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
|
| scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
|
| if (icon_resource_url_.empty())
|
| return result.Pass();
|
| @@ -77,19 +77,19 @@ ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
|
| return result.Pass();
|
| }
|
|
|
| -void ScreenlockBridge::UserPodCustomIconOptions::SetIconAsResourceURL(
|
| +void SigninScreenBridge::UserPodCustomIconOptions::SetIconAsResourceURL(
|
| const std::string& url) {
|
| icon_resource_url_ = url;
|
| }
|
|
|
|
|
| -void ScreenlockBridge::UserPodCustomIconOptions::SetSize(size_t icon_width,
|
| +void SigninScreenBridge::UserPodCustomIconOptions::SetSize(size_t icon_width,
|
| size_t icon_height) {
|
| width_ = icon_width;
|
| height_ = icon_height;
|
| }
|
|
|
| -void ScreenlockBridge::UserPodCustomIconOptions::SetAnimation(
|
| +void SigninScreenBridge::UserPodCustomIconOptions::SetAnimation(
|
| size_t resource_width,
|
| size_t frame_length_ms) {
|
| animation_set_ = true;
|
| @@ -97,24 +97,24 @@ void ScreenlockBridge::UserPodCustomIconOptions::SetAnimation(
|
| animation_frame_length_ms_ = frame_length_ms;
|
| }
|
|
|
| -void ScreenlockBridge::UserPodCustomIconOptions::SetOpacity(size_t opacity) {
|
| +void SigninScreenBridge::UserPodCustomIconOptions::SetOpacity(size_t opacity) {
|
| DCHECK_LE(opacity, 100u);
|
| opacity_ = opacity;
|
| }
|
|
|
| -void ScreenlockBridge::UserPodCustomIconOptions::SetTooltip(
|
| +void SigninScreenBridge::UserPodCustomIconOptions::SetTooltip(
|
| const base::string16& tooltip,
|
| bool autoshow) {
|
| tooltip_ = tooltip;
|
| autoshow_tooltip_ = autoshow;
|
| }
|
|
|
| -void ScreenlockBridge::UserPodCustomIconOptions::SetHardlockOnClick() {
|
| +void SigninScreenBridge::UserPodCustomIconOptions::SetHardlockOnClick() {
|
| hardlock_on_click_ = true;
|
| }
|
|
|
| // static
|
| -std::string ScreenlockBridge::GetAuthenticatedUserEmail(Profile* profile) {
|
| +std::string SigninScreenBridge::GetAuthenticatedUserEmail(Profile* profile) {
|
| // |profile| has to be a signed-in profile with SigninManager already
|
| // created. Otherwise, just crash to collect stack.
|
| SigninManagerBase* signin_manager =
|
| @@ -122,13 +122,13 @@ std::string ScreenlockBridge::GetAuthenticatedUserEmail(Profile* profile) {
|
| return signin_manager->GetAuthenticatedUsername();
|
| }
|
|
|
| -ScreenlockBridge::ScreenlockBridge() : lock_handler_(NULL) {
|
| +SigninScreenBridge::SigninScreenBridge() : lock_handler_(NULL) {
|
| }
|
|
|
| -ScreenlockBridge::~ScreenlockBridge() {
|
| +SigninScreenBridge::~SigninScreenBridge() {
|
| }
|
|
|
| -void ScreenlockBridge::SetLockHandler(LockHandler* lock_handler) {
|
| +void SigninScreenBridge::SetLockHandler(LockHandler* lock_handler) {
|
| DCHECK(lock_handler_ == NULL || lock_handler == NULL);
|
| lock_handler_ = lock_handler;
|
| if (lock_handler_)
|
| @@ -137,18 +137,18 @@ void ScreenlockBridge::SetLockHandler(LockHandler* lock_handler) {
|
| FOR_EACH_OBSERVER(Observer, observers_, OnScreenDidUnlock());
|
| }
|
|
|
| -void ScreenlockBridge::SetFocusedUser(const std::string& user_id) {
|
| +void SigninScreenBridge::SetFocusedUser(const std::string& user_id) {
|
| if (user_id == focused_user_id_)
|
| return;
|
| focused_user_id_ = user_id;
|
| FOR_EACH_OBSERVER(Observer, observers_, OnFocusedUserChanged(user_id));
|
| }
|
|
|
| -bool ScreenlockBridge::IsLocked() const {
|
| +bool SigninScreenBridge::IsLocked() const {
|
| return lock_handler_ != NULL;
|
| }
|
|
|
| -void ScreenlockBridge::Lock(Profile* profile) {
|
| +void SigninScreenBridge::Lock(Profile* profile) {
|
| #if defined(OS_CHROMEOS)
|
| chromeos::SessionManagerClient* session_manager =
|
| chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
|
| @@ -158,15 +158,15 @@ void ScreenlockBridge::Lock(Profile* profile) {
|
| #endif
|
| }
|
|
|
| -void ScreenlockBridge::Unlock(Profile* profile) {
|
| +void SigninScreenBridge::Unlock(Profile* profile) {
|
| if (lock_handler_)
|
| lock_handler_->Unlock(GetAuthenticatedUserEmail(profile));
|
| }
|
|
|
| -void ScreenlockBridge::AddObserver(Observer* observer) {
|
| +void SigninScreenBridge::AddObserver(Observer* observer) {
|
| observers_.AddObserver(observer);
|
| }
|
|
|
| -void ScreenlockBridge::RemoveObserver(Observer* observer) {
|
| +void SigninScreenBridge::RemoveObserver(Observer* observer) {
|
| observers_.RemoveObserver(observer);
|
| }
|
|
|