| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 const WebSize& new_size) { | 377 const WebSize& new_size) { |
| 378 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view); | 378 RenderViewImpl* render_view_impl = static_cast<RenderViewImpl*>(render_view); |
| 379 render_view_impl->ForceResizeForTesting(new_size); | 379 render_view_impl->ForceResizeForTesting(new_size); |
| 380 } | 380 } |
| 381 | 381 |
| 382 void SetDeviceScaleFactor(RenderView* render_view, float factor) { | 382 void SetDeviceScaleFactor(RenderView* render_view, float factor) { |
| 383 static_cast<RenderViewImpl*>(render_view)-> | 383 static_cast<RenderViewImpl*>(render_view)-> |
| 384 SetDeviceScaleFactorForTesting(factor); | 384 SetDeviceScaleFactorForTesting(factor); |
| 385 } | 385 } |
| 386 | 386 |
| 387 float GetWindowToViewportScale(RenderView* render_view) { | 387 float GetWindowToViewportScale(RenderFrame* render_frame) { |
| 388 blink::WebFloatRect rect(0, 0, 1.0f, 0.0); | 388 blink::WebFloatRect rect(0, 0, 1.0f, 0.0); |
| 389 static_cast<RenderViewImpl*>(render_view)->convertWindowToViewport(&rect); | 389 static_cast<RenderFrameImpl*>(render_frame) |
| 390 ->GetRenderWidget() |
| 391 ->convertWindowToViewport(&rect); |
| 390 return rect.width; | 392 return rect.width; |
| 391 } | 393 } |
| 392 | 394 |
| 393 void SetDeviceColorProfile(RenderView* render_view, const std::string& name) { | 395 void SetDeviceColorProfile(RenderView* render_view, const std::string& name) { |
| 394 std::vector<char> color_profile; | 396 std::vector<char> color_profile; |
| 395 | 397 |
| 396 struct TestColorProfile { // A color spin profile. | 398 struct TestColorProfile { // A color spin profile. |
| 397 char* data() { | 399 char* data() { |
| 398 static unsigned char color_profile_data[] = { | 400 static unsigned char color_profile_data[] = { |
| 399 0x00,0x00,0x01,0xea,0x54,0x45,0x53,0x54,0x00,0x00,0x00,0x00, | 401 0x00,0x00,0x01,0xea,0x54,0x45,0x53,0x54,0x00,0x00,0x00,0x00, |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 return result; | 604 return result; |
| 603 } | 605 } |
| 604 | 606 |
| 605 void SchedulerRunIdleTasks(const base::Closure& callback) { | 607 void SchedulerRunIdleTasks(const base::Closure& callback) { |
| 606 blink::scheduler::RendererScheduler* scheduler = | 608 blink::scheduler::RendererScheduler* scheduler = |
| 607 content::RenderThreadImpl::current()->GetRendererScheduler(); | 609 content::RenderThreadImpl::current()->GetRendererScheduler(); |
| 608 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); | 610 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); |
| 609 } | 611 } |
| 610 | 612 |
| 611 } // namespace content | 613 } // namespace content |
| OLD | NEW |