Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2093343002: Scale the emulated event in EventSender when use-zoom-for-dsf is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Scale the emulated event in EventSender when use-zoom-for-dsf is enabled Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 void BlinkTestRunner::SimulateWebNotificationClose(const std::string& title, 499 void BlinkTestRunner::SimulateWebNotificationClose(const std::string& title,
500 bool by_user) { 500 bool by_user) {
501 Send(new LayoutTestHostMsg_SimulateWebNotificationClose(routing_id(), title, 501 Send(new LayoutTestHostMsg_SimulateWebNotificationClose(routing_id(), title,
502 by_user)); 502 by_user));
503 } 503 }
504 504
505 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { 505 void BlinkTestRunner::SetDeviceScaleFactor(float factor) {
506 content::SetDeviceScaleFactor(render_view(), factor); 506 content::SetDeviceScaleFactor(render_view(), factor);
507 } 507 }
508 508
509 float BlinkTestRunner::GetWindowToViewportScale() {
510 return content::GetWindowToViewportScale(render_view());
511 }
512
509 void BlinkTestRunner::EnableUseZoomForDSF() { 513 void BlinkTestRunner::EnableUseZoomForDSF() {
510 base::CommandLine::ForCurrentProcess()-> 514 base::CommandLine::ForCurrentProcess()->
511 AppendSwitch(switches::kEnableUseZoomForDSF); 515 AppendSwitch(switches::kEnableUseZoomForDSF);
512 } 516 }
513 517
514 bool BlinkTestRunner::IsUseZoomForDSFEnabled() { 518 bool BlinkTestRunner::IsUseZoomForDSFEnabled() {
515 return content::IsUseZoomForDSFEnabled(); 519 return content::IsUseZoomForDSFEnabled();
516 } 520 }
517 521
518 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { 522 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 void BlinkTestRunner::ReportLeakDetectionResult( 1028 void BlinkTestRunner::ReportLeakDetectionResult(
1025 const LeakDetectionResult& report) { 1029 const LeakDetectionResult& report) {
1026 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1030 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1027 } 1031 }
1028 1032
1029 void BlinkTestRunner::OnDestruct() { 1033 void BlinkTestRunner::OnDestruct() {
1030 delete this; 1034 delete this;
1031 } 1035 }
1032 1036
1033 } // namespace content 1037 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698