OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ | 5 #ifndef ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ |
6 #define ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ | 6 #define ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 namespace test { | 16 namespace test { |
17 | 17 |
18 class MockUserInfo; | 18 class MockUserInfo; |
19 | 19 |
20 class TestSessionStateDelegate : public SessionStateDelegate { | 20 class TestSessionStateDelegate : public SessionStateDelegate { |
21 public: | 21 public: |
22 TestSessionStateDelegate(); | 22 TestSessionStateDelegate(); |
23 ~TestSessionStateDelegate() override; | 23 ~TestSessionStateDelegate() override; |
24 | 24 |
25 void set_logged_in_users(int users) { logged_in_users_ = users; } | 25 void set_logged_in_users(int users) { logged_in_users_ = users; } |
| 26 void set_session_state(SessionState session_state) { |
| 27 session_state_ = session_state; |
| 28 } |
26 void AddUser(const std::string user_id); | 29 void AddUser(const std::string user_id); |
27 const user_manager::UserInfo* GetActiveUserInfo() const; | 30 const user_manager::UserInfo* GetActiveUserInfo() const; |
28 | 31 |
29 // SessionStateDelegate: | 32 // SessionStateDelegate: |
30 content::BrowserContext* GetBrowserContextByIndex( | 33 content::BrowserContext* GetBrowserContextByIndex( |
31 MultiProfileIndex index) override; | 34 MultiProfileIndex index) override; |
32 content::BrowserContext* GetBrowserContextForWindow( | 35 content::BrowserContext* GetBrowserContextForWindow( |
33 aura::Window* window) override; | 36 aura::Window* window) override; |
34 int GetMaximumNumberOfLoggedInUsers() const override; | 37 int GetMaximumNumberOfLoggedInUsers() const override; |
35 int NumberOfLoggedInUsers() const override; | 38 int NumberOfLoggedInUsers() const override; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool user_adding_screen_running_; | 107 bool user_adding_screen_running_; |
105 | 108 |
106 // The number of users logged in. | 109 // The number of users logged in. |
107 int logged_in_users_; | 110 int logged_in_users_; |
108 | 111 |
109 // The index for the activated user. | 112 // The index for the activated user. |
110 int active_user_index_; | 113 int active_user_index_; |
111 | 114 |
112 std::vector<MockUserInfo*> user_list_; | 115 std::vector<MockUserInfo*> user_list_; |
113 | 116 |
| 117 // The current state of the login screen. |session_state_| becomes active |
| 118 // before the profile and browser UI are available. |
| 119 SessionState session_state_; |
| 120 |
114 DISALLOW_COPY_AND_ASSIGN(TestSessionStateDelegate); | 121 DISALLOW_COPY_AND_ASSIGN(TestSessionStateDelegate); |
115 }; | 122 }; |
116 | 123 |
117 } // namespace test | 124 } // namespace test |
118 } // namespace ash | 125 } // namespace ash |
119 | 126 |
120 #endif // ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ | 127 #endif // ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |