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 15 matching lines...) Expand all Loading... |
26 #include "content/shell/renderer/layout_test/test_media_stream_renderer_factory.
h" | 26 #include "content/shell/renderer/layout_test/test_media_stream_renderer_factory.
h" |
27 #include "content/shell/renderer/shell_render_view_observer.h" | 27 #include "content/shell/renderer/shell_render_view_observer.h" |
28 #include "content/test/mock_webclipboard_impl.h" | 28 #include "content/test/mock_webclipboard_impl.h" |
29 #include "ppapi/shared_impl/ppapi_switches.h" | 29 #include "ppapi/shared_impl/ppapi_switches.h" |
30 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 30 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
31 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" | 31 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClie
nt.h" |
32 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 32 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
33 #include "third_party/WebKit/public/web/WebPluginParams.h" | 33 #include "third_party/WebKit/public/web/WebPluginParams.h" |
34 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 34 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
35 #include "third_party/WebKit/public/web/WebView.h" | 35 #include "third_party/WebKit/public/web/WebView.h" |
| 36 #include "ui/gfx/icc_profile.h" |
36 #include "v8/include/v8.h" | 37 #include "v8/include/v8.h" |
37 | 38 |
38 using blink::WebAudioDevice; | 39 using blink::WebAudioDevice; |
39 using blink::WebClipboard; | 40 using blink::WebClipboard; |
40 using blink::WebFrame; | 41 using blink::WebFrame; |
41 using blink::WebLocalFrame; | 42 using blink::WebLocalFrame; |
42 using blink::WebMIDIAccessor; | 43 using blink::WebMIDIAccessor; |
43 using blink::WebMIDIAccessorClient; | 44 using blink::WebMIDIAccessorClient; |
44 using blink::WebMediaStreamCenter; | 45 using blink::WebMediaStreamCenter; |
45 using blink::WebMediaStreamCenterClient; | 46 using blink::WebMediaStreamCenterClient; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 std::unique_ptr<MediaStreamRendererFactory> | 220 std::unique_ptr<MediaStreamRendererFactory> |
220 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { | 221 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { |
221 #if defined(ENABLE_WEBRTC) | 222 #if defined(ENABLE_WEBRTC) |
222 return std::unique_ptr<MediaStreamRendererFactory>( | 223 return std::unique_ptr<MediaStreamRendererFactory>( |
223 new TestMediaStreamRendererFactory()); | 224 new TestMediaStreamRendererFactory()); |
224 #else | 225 #else |
225 return nullptr; | 226 return nullptr; |
226 #endif | 227 #endif |
227 } | 228 } |
228 | 229 |
| 230 std::unique_ptr<gfx::ICCProfile> |
| 231 LayoutTestContentRendererClient::GetImageDecodeColorProfile() { |
| 232 // TODO(ccameron): Make all platforms use the same color profile for layout |
| 233 // tests. |
| 234 #if defined(OS_WIN) |
| 235 return nullptr; |
| 236 #elif defined(OS_MACOSX) |
| 237 return base::WrapUnique(new gfx::ICCProfile(gfx::ICCProfile::FromCGColorSpace( |
| 238 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)))); |
| 239 #else |
| 240 return base::WrapUnique(new gfx::ICCProfile()); |
| 241 #endif |
| 242 } |
| 243 |
229 void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread( | 244 void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
230 v8::Local<v8::Context> context) { | 245 v8::Local<v8::Context> context) { |
231 blink::WebTestingSupport::injectInternalsObject(context); | 246 blink::WebTestingSupport::injectInternalsObject(context); |
232 } | 247 } |
233 | 248 |
234 } // namespace content | 249 } // namespace content |
OLD | NEW |