| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/public/test/layouttest_support.h" | 5 #include "content/public/test/layouttest_support.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "cc/blink/web_layer_impl.h" | 9 #include "cc/blink/web_layer_impl.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 11 #include "content/child/bluetooth/web_bluetooth_impl.h" |
| 11 #include "content/common/gpu/image_transport_surface.h" | 12 #include "content/common/gpu/image_transport_surface.h" |
| 12 #include "content/public/common/page_state.h" | 13 #include "content/public/common/page_state.h" |
| 13 #include "content/public/renderer/renderer_gamepad_provider.h" | 14 #include "content/public/renderer/renderer_gamepad_provider.h" |
| 14 #include "content/renderer/fetchers/manifest_fetcher.h" | 15 #include "content/renderer/fetchers/manifest_fetcher.h" |
| 15 #include "content/renderer/history_entry.h" | 16 #include "content/renderer/history_entry.h" |
| 16 #include "content/renderer/history_serialization.h" | 17 #include "content/renderer/history_serialization.h" |
| 17 #include "content/renderer/render_frame_impl.h" | 18 #include "content/renderer/render_frame_impl.h" |
| 18 #include "content/renderer/render_thread_impl.h" | 19 #include "content/renderer/render_thread_impl.h" |
| 19 #include "content/renderer/render_view_impl.h" | 20 #include "content/renderer/render_view_impl.h" |
| 20 #include "content/renderer/renderer_blink_platform_impl.h" | 21 #include "content/renderer/renderer_blink_platform_impl.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 color_profile.assign(test.data(), test.data() + test.size()); | 304 color_profile.assign(test.data(), test.data() + test.size()); |
| 304 } else if (name == "adobeRGB") { | 305 } else if (name == "adobeRGB") { |
| 305 AdobeRGBColorProfile test; | 306 AdobeRGBColorProfile test; |
| 306 color_profile.assign(test.data(), test.data() + test.size()); | 307 color_profile.assign(test.data(), test.data() + test.size()); |
| 307 } | 308 } |
| 308 | 309 |
| 309 static_cast<RenderViewImpl*>(render_view)-> | 310 static_cast<RenderViewImpl*>(render_view)-> |
| 310 SetDeviceColorProfileForTesting(color_profile); | 311 SetDeviceColorProfileForTesting(color_profile); |
| 311 } | 312 } |
| 312 | 313 |
| 314 void SetBluetoothMockDataSetForTesting(const std::string& name) { |
| 315 RenderThreadImpl::current() |
| 316 ->blink_platform_impl() |
| 317 ->BluetoothImplForTesting() |
| 318 ->SetBluetoothMockDataSetForTesting(name); |
| 319 } |
| 320 |
| 313 void UseSynchronousResizeMode(RenderView* render_view, bool enable) { | 321 void UseSynchronousResizeMode(RenderView* render_view, bool enable) { |
| 314 static_cast<RenderViewImpl*>(render_view)-> | 322 static_cast<RenderViewImpl*>(render_view)-> |
| 315 UseSynchronousResizeModeForTesting(enable); | 323 UseSynchronousResizeModeForTesting(enable); |
| 316 } | 324 } |
| 317 | 325 |
| 318 void EnableAutoResizeMode(RenderView* render_view, | 326 void EnableAutoResizeMode(RenderView* render_view, |
| 319 const WebSize& min_size, | 327 const WebSize& min_size, |
| 320 const WebSize& max_size) { | 328 const WebSize& max_size) { |
| 321 static_cast<RenderViewImpl*>(render_view)-> | 329 static_cast<RenderViewImpl*>(render_view)-> |
| 322 EnableAutoResizeForTesting(min_size, max_size); | 330 EnableAutoResizeForTesting(min_size, max_size); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 } | 395 } |
| 388 result.append("===============================================\n"); | 396 result.append("===============================================\n"); |
| 389 return result; | 397 return result; |
| 390 } | 398 } |
| 391 | 399 |
| 392 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { | 400 blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { |
| 393 return new cc_blink::WebLayerImpl(layer); | 401 return new cc_blink::WebLayerImpl(layer); |
| 394 } | 402 } |
| 395 | 403 |
| 396 } // namespace content | 404 } // namespace content |
| OLD | NEW |