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

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

Issue 2036873002: Making EventSender talk to the right WebWidget (for OOPIF support). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use RenderWidget::viewRect() [rather than windowRect()] in TransformScreenToWidgetCoordinates. Created 4 years, 2 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "content/shell/renderer/layout_test/leak_detector.h" 55 #include "content/shell/renderer/layout_test/leak_detector.h"
56 #include "media/base/audio_capturer_source.h" 56 #include "media/base/audio_capturer_source.h"
57 #include "media/base/audio_parameters.h" 57 #include "media/base/audio_parameters.h"
58 #include "media/base/video_capturer_source.h" 58 #include "media/base/video_capturer_source.h"
59 #include "net/base/filename_util.h" 59 #include "net/base/filename_util.h"
60 #include "net/base/net_errors.h" 60 #include "net/base/net_errors.h"
61 #include "services/shell/public/cpp/interface_provider.h" 61 #include "services/shell/public/cpp/interface_provider.h"
62 #include "skia/ext/platform_canvas.h" 62 #include "skia/ext/platform_canvas.h"
63 #include "third_party/WebKit/public/platform/FilePathConversion.h" 63 #include "third_party/WebKit/public/platform/FilePathConversion.h"
64 #include "third_party/WebKit/public/platform/Platform.h" 64 #include "third_party/WebKit/public/platform/Platform.h"
65 #include "third_party/WebKit/public/platform/WebInputEvent.h"
65 #include "third_party/WebKit/public/platform/WebPoint.h" 66 #include "third_party/WebKit/public/platform/WebPoint.h"
66 #include "third_party/WebKit/public/platform/WebRect.h" 67 #include "third_party/WebKit/public/platform/WebRect.h"
67 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 68 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
68 #include "third_party/WebKit/public/platform/WebSize.h" 69 #include "third_party/WebKit/public/platform/WebSize.h"
69 #include "third_party/WebKit/public/platform/WebString.h" 70 #include "third_party/WebKit/public/platform/WebString.h"
70 #include "third_party/WebKit/public/platform/WebTaskRunner.h" 71 #include "third_party/WebKit/public/platform/WebTaskRunner.h"
71 #include "third_party/WebKit/public/platform/WebThread.h" 72 #include "third_party/WebKit/public/platform/WebThread.h"
72 #include "third_party/WebKit/public/platform/WebTraceLocation.h" 73 #include "third_party/WebKit/public/platform/WebTraceLocation.h"
73 #include "third_party/WebKit/public/platform/WebURL.h" 74 #include "third_party/WebKit/public/platform/WebURL.h"
74 #include "third_party/WebKit/public/platform/WebURLError.h" 75 #include "third_party/WebKit/public/platform/WebURLError.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 } 494 }
494 495
495 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { 496 void BlinkTestRunner::SetDeviceScaleFactor(float factor) {
496 content::SetDeviceScaleFactor(render_view(), factor); 497 content::SetDeviceScaleFactor(render_view(), factor);
497 } 498 }
498 499
499 float BlinkTestRunner::GetWindowToViewportScale() { 500 float BlinkTestRunner::GetWindowToViewportScale() {
500 return content::GetWindowToViewportScale(render_view()); 501 return content::GetWindowToViewportScale(render_view());
501 } 502 }
502 503
504 std::unique_ptr<blink::WebInputEvent>
505 BlinkTestRunner::TransformScreenToWidgetCoordinates(
506 test_runner::WebWidgetTestProxyBase* web_widget_test_proxy_base,
507 const blink::WebInputEvent& event) {
508 return content::TransformScreenToWidgetCoordinates(web_widget_test_proxy_base,
509 event);
510 }
511
512 test_runner::WebWidgetTestProxyBase* BlinkTestRunner::GetWebWidgetTestProxyBase(
513 blink::WebLocalFrame* frame) {
514 return content::GetWebWidgetTestProxyBase(frame);
515 }
516
503 void BlinkTestRunner::EnableUseZoomForDSF() { 517 void BlinkTestRunner::EnableUseZoomForDSF() {
504 base::CommandLine::ForCurrentProcess()-> 518 base::CommandLine::ForCurrentProcess()->
505 AppendSwitch(switches::kEnableUseZoomForDSF); 519 AppendSwitch(switches::kEnableUseZoomForDSF);
506 } 520 }
507 521
508 bool BlinkTestRunner::IsUseZoomForDSFEnabled() { 522 bool BlinkTestRunner::IsUseZoomForDSFEnabled() {
509 return content::IsUseZoomForDSFEnabled(); 523 return content::IsUseZoomForDSFEnabled();
510 } 524 }
511 525
512 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { 526 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) {
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 void BlinkTestRunner::ReportLeakDetectionResult( 1024 void BlinkTestRunner::ReportLeakDetectionResult(
1011 const LeakDetectionResult& report) { 1025 const LeakDetectionResult& report) {
1012 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1026 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1013 } 1027 }
1014 1028
1015 void BlinkTestRunner::OnDestruct() { 1029 void BlinkTestRunner::OnDestruct() {
1016 delete this; 1030 delete this;
1017 } 1031 }
1018 1032
1019 } // namespace content 1033 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698