OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ASH_TEST_ENVIRONMENT_CONTENT_H_ | 5 #ifndef ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_ |
6 #define ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_ | 6 #define ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_ |
7 | 7 |
8 #include "ash/test/ash_test_environment.h" | 8 #include "ash/test/ash_test_environment.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 return test_shell_content_state_; | 30 return test_shell_content_state_; |
31 } | 31 } |
32 void set_content_state(ShellContentState* content_state) { | 32 void set_content_state(ShellContentState* content_state) { |
33 content_state_ = content_state; | 33 content_state_ = content_state; |
34 } | 34 } |
35 | 35 |
36 // AshTestEnvironment: | 36 // AshTestEnvironment: |
37 void SetUp() override; | 37 void SetUp() override; |
38 void TearDown() override; | 38 void TearDown() override; |
39 base::SequencedWorkerPool* GetBlockingPool() override; | 39 base::SequencedWorkerPool* GetBlockingPool() override; |
40 std::unique_ptr<views::ViewsDelegate> CreateViewsDelegate() override; | 40 std::unique_ptr<AshTestViewsDelegate> CreateViewsDelegate() override; |
41 | 41 |
42 private: | 42 private: |
43 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; | 43 std::unique_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
44 | 44 |
45 // An implementation of ShellContentState supplied by the user prior to | 45 // An implementation of ShellContentState supplied by the user prior to |
46 // SetUp(). | 46 // SetUp(). |
47 ShellContentState* content_state_ = nullptr; | 47 ShellContentState* content_state_ = nullptr; |
48 | 48 |
49 // If |content_state_| is not set prior to SetUp(), this value will be | 49 // If |content_state_| is not set prior to SetUp(), this value will be |
50 // set to an instance of TestShellContentState created by this class. If | 50 // set to an instance of TestShellContentState created by this class. If |
51 // |content_state_| is non-null, this will be nullptr. | 51 // |content_state_| is non-null, this will be nullptr. |
52 TestShellContentState* test_shell_content_state_ = nullptr; | 52 TestShellContentState* test_shell_content_state_ = nullptr; |
53 | 53 |
54 DISALLOW_COPY_AND_ASSIGN(AshTestEnvironmentContent); | 54 DISALLOW_COPY_AND_ASSIGN(AshTestEnvironmentContent); |
55 }; | 55 }; |
56 | 56 |
57 } // namespace test | 57 } // namespace test |
58 } // namespace ash | 58 } // namespace ash |
59 | 59 |
60 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_ | 60 #endif // ASH_TEST_ASH_TEST_ENVIRONMENT_CONTENT_H_ |
OLD | NEW |