| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client
.h" | 5 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client
.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
| 10 #include "components/test_runner/mock_credential_manager_client.h" | 10 #include "components/test_runner/mock_credential_manager_client.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "content/shell/common/shell_switches.h" | 22 #include "content/shell/common/shell_switches.h" |
| 23 #include "content/shell/renderer/layout_test/blink_test_helpers.h" | 23 #include "content/shell/renderer/layout_test/blink_test_helpers.h" |
| 24 #include "content/shell/renderer/layout_test/blink_test_runner.h" | 24 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 25 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h
" | 25 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h
" |
| 26 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" | 26 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer.
h" |
| 27 #include "content/shell/renderer/layout_test/test_media_stream_renderer_factory.
h" | 27 #include "content/shell/renderer/layout_test/test_media_stream_renderer_factory.
h" |
| 28 #include "content/shell/renderer/shell_render_view_observer.h" | 28 #include "content/shell/renderer/shell_render_view_observer.h" |
| 29 #include "content/test/mock_webclipboard_impl.h" | 29 #include "content/test/mock_webclipboard_impl.h" |
| 30 #include "ppapi/shared_impl/ppapi_switches.h" | 30 #include "ppapi/shared_impl/ppapi_switches.h" |
| 31 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 31 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
| 32 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | |
| 33 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 32 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| 34 #include "third_party/WebKit/public/web/WebKit.h" | 33 #include "third_party/WebKit/public/web/WebKit.h" |
| 35 #include "third_party/WebKit/public/web/WebPluginParams.h" | 34 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 36 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 35 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 37 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 36 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
| 38 #include "third_party/WebKit/public/web/WebView.h" | 37 #include "third_party/WebKit/public/web/WebView.h" |
| 39 #include "ui/gfx/icc_profile.h" | 38 #include "ui/gfx/icc_profile.h" |
| 40 #include "v8/include/v8.h" | 39 #include "v8/include/v8.h" |
| 41 | 40 |
| 42 using blink::WebAudioDevice; | 41 using blink::WebAudioDevice; |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 clipboard_.reset(new MockWebClipboardImpl); | 204 clipboard_.reset(new MockWebClipboardImpl); |
| 206 return clipboard_.get(); | 205 return clipboard_.get(); |
| 207 } | 206 } |
| 208 | 207 |
| 209 WebThemeEngine* LayoutTestContentRendererClient::OverrideThemeEngine() { | 208 WebThemeEngine* LayoutTestContentRendererClient::OverrideThemeEngine() { |
| 210 return LayoutTestRenderThreadObserver::GetInstance() | 209 return LayoutTestRenderThreadObserver::GetInstance() |
| 211 ->test_interfaces() | 210 ->test_interfaces() |
| 212 ->ThemeEngine(); | 211 ->ThemeEngine(); |
| 213 } | 212 } |
| 214 | 213 |
| 215 std::unique_ptr<blink::WebAppBannerClient> | |
| 216 LayoutTestContentRendererClient::CreateAppBannerClient( | |
| 217 RenderFrame* render_frame) { | |
| 218 test_runner::WebTestInterfaces* interfaces = | |
| 219 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); | |
| 220 return interfaces->CreateAppBannerClient(); | |
| 221 } | |
| 222 | |
| 223 std::unique_ptr<MediaStreamRendererFactory> | 214 std::unique_ptr<MediaStreamRendererFactory> |
| 224 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { | 215 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { |
| 225 #if defined(ENABLE_WEBRTC) | 216 #if defined(ENABLE_WEBRTC) |
| 226 return std::unique_ptr<MediaStreamRendererFactory>( | 217 return std::unique_ptr<MediaStreamRendererFactory>( |
| 227 new TestMediaStreamRendererFactory()); | 218 new TestMediaStreamRendererFactory()); |
| 228 #else | 219 #else |
| 229 return nullptr; | 220 return nullptr; |
| 230 #endif | 221 #endif |
| 231 } | 222 } |
| 232 | 223 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 263 switches::kEnableFontAntialiasing)) { | 254 switches::kEnableFontAntialiasing)) { |
| 264 blink::setFontAntialiasingEnabledForTest(true); | 255 blink::setFontAntialiasingEnabledForTest(true); |
| 265 } | 256 } |
| 266 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 257 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 267 switches::kAlwaysUseComplexText)) { | 258 switches::kAlwaysUseComplexText)) { |
| 268 blink::setAlwaysUseComplexTextForTest(true); | 259 blink::setAlwaysUseComplexTextForTest(true); |
| 269 } | 260 } |
| 270 } | 261 } |
| 271 | 262 |
| 272 } // namespace content | 263 } // namespace content |
| OLD | NEW |