| 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 "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "ui/gfx/image/image_skia.h" | 14 #include "ui/gfx/image/image_skia.h" |
| 15 | 15 |
| 16 namespace ash { | 16 namespace ash { |
| 17 namespace test { | 17 namespace test { |
| 18 | 18 |
| 19 class MockUserInfo; | 19 class MockUserInfo; |
| 20 | 20 |
| 21 class TestSessionStateDelegate : public SessionStateDelegate { | 21 class TestSessionStateDelegate : public SessionStateDelegate { |
| 22 public: | 22 public: |
| 23 TestSessionStateDelegate(); | 23 TestSessionStateDelegate(); |
| 24 ~TestSessionStateDelegate() override; | 24 ~TestSessionStateDelegate() override; |
| 25 | 25 |
| 26 void set_logged_in_users(int users) { logged_in_users_ = users; } | 26 void set_logged_in_users(int users) { logged_in_users_ = users; } |
| 27 void set_session_state(SessionState session_state) { | 27 void set_session_state(SessionState session_state) { |
| 28 session_state_ = session_state; | 28 session_state_ = session_state; |
| 29 } | 29 } |
| 30 void AddUser(const std::string user_id); | 30 void AddUser(const std::string& user_id); |
| 31 const user_manager::UserInfo* GetActiveUserInfo() const; | 31 const user_manager::UserInfo* GetActiveUserInfo() const; |
| 32 | 32 |
| 33 // SessionStateDelegate: | 33 // SessionStateDelegate: |
| 34 content::BrowserContext* GetBrowserContextByIndex( | 34 content::BrowserContext* GetBrowserContextByIndex( |
| 35 MultiProfileIndex index) override; | 35 MultiProfileIndex index) override; |
| 36 content::BrowserContext* GetBrowserContextForWindow( | 36 content::BrowserContext* GetBrowserContextForWindow( |
| 37 aura::Window* window) override; | 37 aura::Window* window) override; |
| 38 content::BrowserContext* GetUserPresentingBrowserContextForWindow( | 38 content::BrowserContext* GetUserPresentingBrowserContextForWindow( |
| 39 aura::Window* window) override; | 39 aura::Window* window) override; |
| 40 int GetMaximumNumberOfLoggedInUsers() const override; | 40 int GetMaximumNumberOfLoggedInUsers() const override; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // before the profile and browser UI are available. | 118 // before the profile and browser UI are available. |
| 119 SessionState session_state_; | 119 SessionState session_state_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(TestSessionStateDelegate); | 121 DISALLOW_COPY_AND_ASSIGN(TestSessionStateDelegate); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace test | 124 } // namespace test |
| 125 } // namespace ash | 125 } // namespace ash |
| 126 | 126 |
| 127 #endif // ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ | 127 #endif // ASH_TEST_TEST_SESSION_STATE_DELEGATE_H_ |
| OLD | NEW |