Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: ash/test/test_shell_delegate.h

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/test/test_shell_delegate.h
diff --git a/ash/test/test_shell_delegate.h b/ash/test/test_shell_delegate.h
index 1ff9ce945ae7ed6d652047b192235920f50af34b..6c95ea819c9564433dd67e13210f2eaae772d94e 100644
--- a/ash/test/test_shell_delegate.h
+++ b/ash/test/test_shell_delegate.h
@@ -18,7 +18,7 @@ class KeyboardControllerProxy;
namespace ash {
namespace test {
-class AshTestBase;
+class TestSessionStateDelegate;
class TestShellDelegate : public ShellDelegate {
public:
@@ -26,16 +26,9 @@ class TestShellDelegate : public ShellDelegate {
virtual ~TestShellDelegate();
// Overridden from ShellDelegate:
- virtual bool IsUserLoggedIn() const OVERRIDE;
- virtual bool IsSessionStarted() const OVERRIDE;
- virtual bool IsGuestSession() const OVERRIDE;
virtual bool IsFirstRunAfterBoot() const OVERRIDE;
virtual bool IsMultiProfilesEnabled() const OVERRIDE;
virtual bool IsRunningInForcedAppMode() const OVERRIDE;
- virtual bool CanLockScreen() const OVERRIDE;
- virtual void LockScreen() OVERRIDE;
- virtual void UnlockScreen() OVERRIDE;
- virtual bool IsScreenLocked() const OVERRIDE;
virtual void PreInit() OVERRIDE;
virtual void Shutdown() OVERRIDE;
virtual void Exit() OVERRIDE;
@@ -68,6 +61,7 @@ class TestShellDelegate : public ShellDelegate {
virtual SystemTrayDelegate* CreateSystemTrayDelegate() OVERRIDE;
virtual UserWallpaperDelegate* CreateUserWallpaperDelegate() OVERRIDE;
virtual CapsLockDelegate* CreateCapsLockDelegate() OVERRIDE;
+ virtual SessionStateDelegate* CreateSessionStateDelegate() OVERRIDE;
virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE;
virtual void OpenFeedbackPage() OVERRIDE;
virtual void RecordUserMetricsAction(UserMetricsAction action) OVERRIDE;
@@ -85,39 +79,19 @@ class TestShellDelegate : public ShellDelegate {
int num_exit_requests() const { return num_exit_requests_; }
+ TestSessionStateDelegate* test_session_state_delegate();
+
private:
- friend class ash::test::AshTestBase;
-
- // Given |session_started| will update internal state.
- // If |session_started| is true this method will also set
- // |user_logged_in_| to true.
- // When session is started it always means that user has logged in.
- // Possible situation is that user has already logged in but session has not
- // been started (user selects avatar and login window is still open).
- void SetSessionStarted(bool session_started);
-
- // Given |user_logged_in| will update internal state.
- // If |user_logged_in| is false this method will also set |session_started_|
- // to false. When user is not logged in it always means that session
- // hasn't been started too.
- void SetUserLoggedIn(bool user_logged_in);
-
- // Sets the internal state that indicates whether the user can lock the
- // screen.
- void SetCanLockScreen(bool can_lock_screen);
-
- bool locked_;
- bool session_started_;
bool spoken_feedback_enabled_;
bool high_contrast_enabled_;
bool screen_magnifier_enabled_;
MagnifierType screen_magnifier_type_;
- bool user_logged_in_;
- bool can_lock_screen_;
int num_exit_requests_;
scoped_ptr<content::BrowserContext> current_browser_context_;
+ TestSessionStateDelegate* test_session_state_delegate_; // Not owned.
+
DISALLOW_COPY_AND_ASSIGN(TestShellDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698