Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h" | 25 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h" |
| 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/WebPluginParams.h" | 32 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 33 #include "third_party/WebKit/public/web/WebTestingSupport.h" | 33 #include "third_party/WebKit/public/web/WebTestingSupport.h" |
| 34 #include "third_party/WebKit/public/web/WebView.h" | 34 #include "third_party/WebKit/public/web/WebView.h" |
| 35 #include "ui/gfx/icc_profile.h" | |
| 35 #include "v8/include/v8.h" | 36 #include "v8/include/v8.h" |
| 36 | 37 |
| 37 using blink::WebAudioDevice; | 38 using blink::WebAudioDevice; |
| 38 using blink::WebClipboard; | 39 using blink::WebClipboard; |
| 39 using blink::WebFrame; | 40 using blink::WebFrame; |
| 40 using blink::WebLocalFrame; | 41 using blink::WebLocalFrame; |
| 41 using blink::WebMIDIAccessor; | 42 using blink::WebMIDIAccessor; |
| 42 using blink::WebMIDIAccessorClient; | 43 using blink::WebMIDIAccessorClient; |
| 43 using blink::WebMediaStreamCenter; | 44 using blink::WebMediaStreamCenter; |
| 44 using blink::WebMediaStreamCenterClient; | 45 using blink::WebMediaStreamCenterClient; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 std::unique_ptr<MediaStreamRendererFactory> | 197 std::unique_ptr<MediaStreamRendererFactory> |
| 197 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { | 198 LayoutTestContentRendererClient::CreateMediaStreamRendererFactory() { |
| 198 #if defined(ENABLE_WEBRTC) | 199 #if defined(ENABLE_WEBRTC) |
| 199 return std::unique_ptr<MediaStreamRendererFactory>( | 200 return std::unique_ptr<MediaStreamRendererFactory>( |
| 200 new TestMediaStreamRendererFactory()); | 201 new TestMediaStreamRendererFactory()); |
| 201 #else | 202 #else |
| 202 return nullptr; | 203 return nullptr; |
| 203 #endif | 204 #endif |
| 204 } | 205 } |
| 205 | 206 |
| 207 std::unique_ptr<gfx::ICCProfile> | |
| 208 LayoutTestContentRendererClient::GetImageDecodeColorProfile() { | |
|
ccameron
2016/08/09 07:11:08
An alternative TODO here would be to change all pl
hubbe
2016/08/09 16:59:54
Why is it that the code behaves differently when y
Dirk Pranke
2016/08/09 20:32:31
Yup, I'd say that's the right thing to do, so mayb
| |
| 209 #if defined(OS_WIN) | |
| 210 // TODO(ccameron): Find out what color profile is currently preset on Windows | |
| 211 // test machines, and return that here. | |
| 212 return nullptr; | |
| 213 #elif defined(OS_MACOSX) | |
| 214 // Layout tests on Mac expect a generic RGB color profile. | |
| 215 return base::WrapUnique(new gfx::ICCProfile(gfx::ICCProfile::FromCGColorSpace( | |
| 216 CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB)))); | |
| 217 #else | |
| 218 // All other platforms expect no color profile to have been specified. | |
| 219 return base::WrapUnique(new gfx::ICCProfile()); | |
| 220 #endif | |
| 221 } | |
| 222 | |
| 206 void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread( | 223 void LayoutTestContentRendererClient::DidInitializeWorkerContextOnWorkerThread( |
| 207 v8::Local<v8::Context> context) { | 224 v8::Local<v8::Context> context) { |
| 208 blink::WebTestingSupport::injectInternalsObject(context); | 225 blink::WebTestingSupport::injectInternalsObject(context); |
| 209 } | 226 } |
| 210 | 227 |
| 211 } // namespace content | 228 } // namespace content |
| OLD | NEW |