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

Unified Diff: components/test_runner/web_test_delegate.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/test_runner/web_frame_test_client.cc ('k') | components/test_runner/web_test_interfaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/web_test_delegate.h
diff --git a/components/test_runner/web_test_delegate.h b/components/test_runner/web_test_delegate.h
index e01b95ff55009db202a8bfd14762b5c675f3dc7f..820d06b94069fd6d63d4e92e717692cf3f68050c 100644
--- a/components/test_runner/web_test_delegate.h
+++ b/components/test_runner/web_test_delegate.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_
#define COMPONENTS_TEST_RUNNER_WEB_TEST_DELEGATE_H_
+#include <memory>
#include <string>
#include <vector>
@@ -25,10 +26,11 @@ class DictionaryValue;
namespace blink {
class WebDeviceMotionData;
class WebDeviceOrientationData;
-class WebFrame;
+class WebLocalFrame;
class WebGamepad;
class WebGamepads;
class WebHistoryItem;
+class WebInputEvent;
class WebLayer;
class WebLocalFrame;
class WebMediaStream;
@@ -53,7 +55,7 @@ namespace test_runner {
class DeviceLightData;
class GamepadController;
class WebTask;
-class WebViewTestProxyBase;
+class WebWidgetTestProxyBase;
struct TestPreferences;
class WebTestDelegate {
@@ -162,6 +164,21 @@ class WebTestDelegate {
// use-zoom-for-dsf is disabled, this return always 1.0f.
virtual float GetWindowToViewportScale() = 0;
+ // Converts |event| from screen coordinates used by test_runner::EventSender
+ // into coordinates that are understood by the widget associated with
+ // |web_widget_test_proxy_base|. Returns nullptr if no transformation was
+ // necessary (e.g. for a keyboard event OR if widget requires no scaling
+ // and has coordinates starting at (0,0)).
+ virtual std::unique_ptr<blink::WebInputEvent>
+ TransformScreenToWidgetCoordinates(
+ test_runner::WebWidgetTestProxyBase* web_widget_test_proxy_base,
+ const blink::WebInputEvent& event) = 0;
+
+ // Gets WebWidgetTestProxyBase associated with |frame| (associated with either
+ // a RenderView or a RenderWidget for the local root).
+ virtual test_runner::WebWidgetTestProxyBase* GetWebWidgetTestProxyBase(
+ blink::WebLocalFrame* frame) = 0;
+
// Enable zoom-for-dsf option.
virtual void EnableUseZoomForDSF() = 0;
« no previous file with comments | « components/test_runner/web_frame_test_client.cc ('k') | components/test_runner/web_test_interfaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698