| Index: trunk/src/ash/test/test_shell_delegate.h
|
| ===================================================================
|
| --- trunk/src/ash/test/test_shell_delegate.h (revision 194588)
|
| +++ trunk/src/ash/test/test_shell_delegate.h (working copy)
|
| @@ -18,7 +18,7 @@
|
| namespace ash {
|
| namespace test {
|
|
|
| -class TestSessionStateDelegate;
|
| +class AshTestBase;
|
|
|
| class TestShellDelegate : public ShellDelegate {
|
| public:
|
| @@ -26,9 +26,16 @@
|
| 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;
|
| @@ -61,7 +68,6 @@
|
| 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;
|
| @@ -79,19 +85,39 @@
|
|
|
| int num_exit_requests() const { return num_exit_requests_; }
|
|
|
| - TestSessionStateDelegate* test_session_state_delegate();
|
| + private:
|
| + friend class ash::test::AshTestBase;
|
|
|
| - private:
|
| + // 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);
|
| };
|
|
|
|
|