| 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/web_cache/renderer/web_cache_render_process_observer.h" | 10 #include "components/web_cache/renderer/web_cache_render_process_observer.h" |
| 11 #include "content/common/sandbox_win.h" | |
| 12 #include "content/public/common/content_constants.h" | 11 #include "content/public/common/content_constants.h" |
| 13 #include "content/public/common/content_switches.h" | 12 #include "content/public/common/content_switches.h" |
| 14 #include "content/public/renderer/render_view.h" | 13 #include "content/public/renderer/render_view.h" |
| 15 #include "content/public/test/layouttest_support.h" | 14 #include "content/public/test/layouttest_support.h" |
| 16 #include "content/shell/common/shell_switches.h" | 15 #include "content/shell/common/shell_switches.h" |
| 17 #include "content/shell/common/webkit_test_helpers.h" | 16 #include "content/shell/common/webkit_test_helpers.h" |
| 18 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h
" | 17 #include "content/shell/renderer/layout_test/layout_test_render_frame_observer.h
" |
| 19 #include "content/shell/renderer/layout_test/layout_test_render_process_observer
.h" | 18 #include "content/shell/renderer/layout_test/layout_test_render_process_observer
.h" |
| 20 #include "content/shell/renderer/layout_test/webkit_test_runner.h" | 19 #include "content/shell/renderer/layout_test/webkit_test_runner.h" |
| 21 #include "content/shell/renderer/shell_render_view_observer.h" | 20 #include "content/shell/renderer/shell_render_view_observer.h" |
| 22 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" | 21 #include "content/shell/renderer/test_runner/mock_credential_manager_client.h" |
| 23 #include "content/shell/renderer/test_runner/web_test_interfaces.h" | 22 #include "content/shell/renderer/test_runner/web_test_interfaces.h" |
| 24 #include "content/shell/renderer/test_runner/web_test_proxy.h" | 23 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
| 25 #include "content/test/mock_webclipboard_impl.h" | 24 #include "content/test/mock_webclipboard_impl.h" |
| 26 #include "ppapi/shared_impl/ppapi_switches.h" | 25 #include "ppapi/shared_impl/ppapi_switches.h" |
| 27 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 26 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
| 28 #include "third_party/WebKit/public/web/WebPluginParams.h" | 27 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 29 #include "third_party/WebKit/public/web/WebView.h" | 28 #include "third_party/WebKit/public/web/WebView.h" |
| 30 #include "v8/include/v8.h" | 29 #include "v8/include/v8.h" |
| 31 | 30 |
| 32 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
| 33 #include "content/public/renderer/render_font_warmup_win.h" | 32 #include "content/public/renderer/render_font_warmup_win.h" |
| 34 #include "third_party/WebKit/public/web/win/WebFontRendering.h" | 33 #include "third_party/WebKit/public/web/win/WebFontRendering.h" |
| 35 #include "third_party/skia/include/ports/SkFontMgr.h" | 34 #include "third_party/skia/include/ports/SkFontMgr.h" |
| 35 #include "ui/gfx/win/direct_write.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 using blink::WebAudioDevice; | 38 using blink::WebAudioDevice; |
| 39 using blink::WebClipboard; | 39 using blink::WebClipboard; |
| 40 using blink::WebLocalFrame; | 40 using blink::WebLocalFrame; |
| 41 using blink::WebMIDIAccessor; | 41 using blink::WebMIDIAccessor; |
| 42 using blink::WebMIDIAccessorClient; | 42 using blink::WebMIDIAccessorClient; |
| 43 using blink::WebMediaStreamCenter; | 43 using blink::WebMediaStreamCenter; |
| 44 using blink::WebMediaStreamCenterClient; | 44 using blink::WebMediaStreamCenterClient; |
| 45 using blink::WebPlugin; | 45 using blink::WebPlugin; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 } // namespace | 69 } // namespace |
| 70 #endif // OS_WIN | 70 #endif // OS_WIN |
| 71 | 71 |
| 72 LayoutTestContentRendererClient::LayoutTestContentRendererClient() { | 72 LayoutTestContentRendererClient::LayoutTestContentRendererClient() { |
| 73 EnableWebTestProxyCreation( | 73 EnableWebTestProxyCreation( |
| 74 base::Bind(&LayoutTestContentRendererClient::WebTestProxyCreated, | 74 base::Bind(&LayoutTestContentRendererClient::WebTestProxyCreated, |
| 75 base::Unretained(this))); | 75 base::Unretained(this))); |
| 76 | 76 |
| 77 #if defined(OS_WIN) | 77 #if defined(OS_WIN) |
| 78 if (ShouldUseDirectWrite()) | 78 if (gfx::win::ShouldUseDirectWrite()) |
| 79 RegisterSideloadedTypefaces(GetPreSandboxWarmupFontMgr()); | 79 RegisterSideloadedTypefaces(GetPreSandboxWarmupFontMgr()); |
| 80 #endif | 80 #endif |
| 81 } | 81 } |
| 82 | 82 |
| 83 LayoutTestContentRendererClient::~LayoutTestContentRendererClient() { | 83 LayoutTestContentRendererClient::~LayoutTestContentRendererClient() { |
| 84 } | 84 } |
| 85 | 85 |
| 86 void LayoutTestContentRendererClient::RenderThreadStarted() { | 86 void LayoutTestContentRendererClient::RenderThreadStarted() { |
| 87 ShellContentRendererClient::RenderThreadStarted(); | 87 ShellContentRendererClient::RenderThreadStarted(); |
| 88 shell_observer_.reset(new LayoutTestRenderProcessObserver()); | 88 shell_observer_.reset(new LayoutTestRenderProcessObserver()); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 LayoutTestRenderProcessObserver::GetInstance()->SetTestDelegate( | 171 LayoutTestRenderProcessObserver::GetInstance()->SetTestDelegate( |
| 172 test_runner); | 172 test_runner); |
| 173 } | 173 } |
| 174 proxy->SetInterfaces( | 174 proxy->SetInterfaces( |
| 175 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()); | 175 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()); |
| 176 test_runner->proxy()->SetDelegate( | 176 test_runner->proxy()->SetDelegate( |
| 177 LayoutTestRenderProcessObserver::GetInstance()->test_delegate()); | 177 LayoutTestRenderProcessObserver::GetInstance()->test_delegate()); |
| 178 } | 178 } |
| 179 | 179 |
| 180 } // namespace content | 180 } // namespace content |
| OLD | NEW |