OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ | 5 #ifndef CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ |
6 #define CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ | 6 #define CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "cc/blink/web_compositor_support_impl.h" | 14 #include "cc/blink/web_compositor_support_impl.h" |
15 #include "content/child/blink_platform_impl.h" | 15 #include "content/child/blink_platform_impl.h" |
16 #include "content/child/simple_webmimeregistry_impl.h" | 16 #include "content/child/simple_webmimeregistry_impl.h" |
17 #include "content/child/webfileutilities_impl.h" | 17 #include "content/child/webfileutilities_impl.h" |
18 #include "content/test/mock_webblob_registry_impl.h" | 18 #include "content/test/mock_webblob_registry_impl.h" |
19 #include "content/test/mock_webclipboard_impl.h" | 19 #include "content/test/mock_webclipboard_impl.h" |
20 #include "third_party/WebKit/public/platform/WebURLLoaderMockFactory.h" | 20 #include "third_party/WebKit/public/platform/WebURLLoaderMockFactory.h" |
21 | 21 |
22 namespace base { | 22 namespace base { |
23 class StatsTable; | 23 class StatsTable; |
24 } | 24 } |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
27 class WebLayerTreeView; | 27 class WebLayerTreeView; |
28 } | 28 } |
29 | 29 |
| 30 namespace blink { |
30 namespace scheduler { | 31 namespace scheduler { |
31 class RendererScheduler; | 32 class RendererScheduler; |
32 } | 33 } |
| 34 } |
33 | 35 |
34 namespace content { | 36 namespace content { |
35 | 37 |
36 // An implementation of BlinkPlatformImpl for tests. | 38 // An implementation of BlinkPlatformImpl for tests. |
37 class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { | 39 class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { |
38 public: | 40 public: |
39 TestBlinkWebUnitTestSupport(); | 41 TestBlinkWebUnitTestSupport(); |
40 ~TestBlinkWebUnitTestSupport() override; | 42 ~TestBlinkWebUnitTestSupport() override; |
41 | 43 |
42 blink::WebBlobRegistry* blobRegistry() override; | 44 blink::WebBlobRegistry* blobRegistry() override; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 blink::WebPluginListBuilder* builder) override; | 79 blink::WebPluginListBuilder* builder) override; |
78 | 80 |
79 private: | 81 private: |
80 MockWebBlobRegistryImpl blob_registry_; | 82 MockWebBlobRegistryImpl blob_registry_; |
81 SimpleWebMimeRegistryImpl mime_registry_; | 83 SimpleWebMimeRegistryImpl mime_registry_; |
82 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_; | 84 std::unique_ptr<MockWebClipboardImpl> mock_clipboard_; |
83 WebFileUtilitiesImpl file_utilities_; | 85 WebFileUtilitiesImpl file_utilities_; |
84 base::ScopedTempDir file_system_root_; | 86 base::ScopedTempDir file_system_root_; |
85 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_; | 87 std::unique_ptr<blink::WebURLLoaderMockFactory> url_loader_factory_; |
86 cc_blink::WebCompositorSupportImpl compositor_support_; | 88 cc_blink::WebCompositorSupportImpl compositor_support_; |
87 std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler_; | 89 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler_; |
88 std::unique_ptr<blink::WebThread> web_thread_; | 90 std::unique_ptr<blink::WebThread> web_thread_; |
89 | 91 |
90 #if defined(OS_WIN) || defined(OS_MACOSX) | 92 #if defined(OS_WIN) || defined(OS_MACOSX) |
91 blink::WebThemeEngine* active_theme_engine_ = nullptr; | 93 blink::WebThemeEngine* active_theme_engine_ = nullptr; |
92 #endif | 94 #endif |
93 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport); | 95 DISALLOW_COPY_AND_ASSIGN(TestBlinkWebUnitTestSupport); |
94 }; | 96 }; |
95 | 97 |
96 } // namespace content | 98 } // namespace content |
97 | 99 |
98 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ | 100 #endif // CONTENT_TEST_TEST_BLINK_WEB_UNIT_TEST_SUPPORT_H_ |
OLD | NEW |