Chromium Code Reviews| 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/shell/renderer/layout_test/blink_test_runner.h" | 5 #include "content/shell/renderer/layout_test/blink_test_runner.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <clocale> | 10 #include <clocale> |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 487 bool by_user) { | 487 bool by_user) { |
| 488 Send(new LayoutTestHostMsg_SimulateWebNotificationClose(routing_id(), title, | 488 Send(new LayoutTestHostMsg_SimulateWebNotificationClose(routing_id(), title, |
| 489 by_user)); | 489 by_user)); |
| 490 } | 490 } |
| 491 | 491 |
| 492 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { | 492 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { |
| 493 content::SetDeviceScaleFactor(render_view(), factor); | 493 content::SetDeviceScaleFactor(render_view(), factor); |
| 494 } | 494 } |
| 495 | 495 |
| 496 float BlinkTestRunner::GetWindowToViewportScale() { | 496 float BlinkTestRunner::GetWindowToViewportScale() { |
| 497 return content::GetWindowToViewportScale(render_view()); | 497 return content::GetWindowToViewportScale(render_view()->GetMainRenderFrame()); |
|
dcheng
2016/09/02 08:57:39
And these would also need to be frame-associated a
lfg
2016/09/02 17:36:37
Yes, I spent a bit of time looking at that, but th
dcheng
2016/09/08 05:25:47
Just to confirm: this will explode horribly at som
lfg
2016/09/08 21:40:43
Yes, if the main_render_frame_ is null this will c
| |
| 498 } | 498 } |
| 499 | 499 |
| 500 void BlinkTestRunner::EnableUseZoomForDSF() { | 500 void BlinkTestRunner::EnableUseZoomForDSF() { |
| 501 base::CommandLine::ForCurrentProcess()-> | 501 base::CommandLine::ForCurrentProcess()-> |
| 502 AppendSwitch(switches::kEnableUseZoomForDSF); | 502 AppendSwitch(switches::kEnableUseZoomForDSF); |
| 503 } | 503 } |
| 504 | 504 |
| 505 bool BlinkTestRunner::IsUseZoomForDSFEnabled() { | 505 bool BlinkTestRunner::IsUseZoomForDSFEnabled() { |
| 506 return content::IsUseZoomForDSFEnabled(); | 506 return content::IsUseZoomForDSFEnabled(); |
| 507 } | 507 } |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1017 void BlinkTestRunner::ReportLeakDetectionResult( | 1017 void BlinkTestRunner::ReportLeakDetectionResult( |
| 1018 const LeakDetectionResult& report) { | 1018 const LeakDetectionResult& report) { |
| 1019 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); | 1019 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); |
| 1020 } | 1020 } |
| 1021 | 1021 |
| 1022 void BlinkTestRunner::OnDestruct() { | 1022 void BlinkTestRunner::OnDestruct() { |
| 1023 delete this; | 1023 delete this; |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 } // namespace content | 1026 } // namespace content |
| OLD | NEW |