summaryrefslogtreecommitdiffstats
path: root/ash/test
diff options
context:
space:
mode:
authornkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 12:23:44 +0000
committernkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 12:23:44 +0000
commit8104d0b29d762d72848aa8df1a88835fc90d2ec2 (patch)
treedff9a823b3ea93178d527c929486447e307b33d4 /ash/test
parentf173c6d48a3e93186ea230567e8b69129670a555 (diff)
downloadchromium_src-8104d0b29d762d72848aa8df1a88835fc90d2ec2.zip
chromium_src-8104d0b29d762d72848aa8df1a88835fc90d2ec2.tar.gz
chromium_src-8104d0b29d762d72848aa8df1a88835fc90d2ec2.tar.bz2
Notify about major session changes events.
This makes sure that multi-profile user adding UI gets 100% of working area and also works fine with onscreen keyboard. BUG=361157 Review URL: https://codereview.chromium.org/231123002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test')
-rw-r--r--ash/test/test_session_state_delegate.cc10
-rw-r--r--ash/test/test_session_state_delegate.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc
index c4f1ea5..f7efe1d 100644
--- a/ash/test/test_session_state_delegate.cc
+++ b/ash/test/test_session_state_delegate.cc
@@ -91,6 +91,16 @@ bool TestSessionStateDelegate::IsUserSessionBlocked() const {
user_adding_screen_running_;
}
+SessionStateDelegate::SessionState TestSessionStateDelegate::GetSessionState()
+ const {
+ if (user_adding_screen_running_)
+ return SESSION_STATE_LOGIN_SECONDARY;
+
+ // Assuming that if session is not active we're at login.
+ return IsActiveUserSessionStarted() ?
+ SESSION_STATE_ACTIVE : SESSION_STATE_LOGIN_PRIMARY;
+}
+
void TestSessionStateDelegate::SetHasActiveUser(bool has_active_user) {
has_active_user_ = has_active_user;
if (!has_active_user)
diff --git a/ash/test/test_session_state_delegate.h b/ash/test/test_session_state_delegate.h
index e56771d..cceefa2 100644
--- a/ash/test/test_session_state_delegate.h
+++ b/ash/test/test_session_state_delegate.h
@@ -35,6 +35,7 @@ class TestSessionStateDelegate : public SessionStateDelegate {
virtual void LockScreen() OVERRIDE;
virtual void UnlockScreen() OVERRIDE;
virtual bool IsUserSessionBlocked() const OVERRIDE;
+ virtual SessionState GetSessionState() const OVERRIDE;
virtual const base::string16 GetUserDisplayName(
ash::MultiProfileIndex index) const OVERRIDE;
virtual const base::string16 GetUserGivenName(