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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 138163016: [DevTools] Touch emulation in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non-aura compile Created 6 years, 8 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
Index: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 170701853f98e230ebdb265a0c64ffd9a0a84cee..6fb3203865b730b6709cb9f861162f90ae5c6c15 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -26,6 +26,7 @@
#include "content/browser/renderer_host/input/input_ack_handler.h"
#include "content/browser/renderer_host/input/input_router_client.h"
#include "content/browser/renderer_host/input/synthetic_gesture.h"
+#include "content/browser/renderer_host/input/touch_emulator_client.h"
#include "content/common/input/synthetic_gesture_packet.h"
#include "content/common/view_message_enums.h"
#include "content/port/browser/event_with_latency_info.h"
@@ -84,6 +85,7 @@ class RenderWidgetHostDelegate;
class RenderWidgetHostViewPort;
class SyntheticGestureController;
class TimeoutMonitor;
+class TouchEmulator;
class WebCursor;
struct EditCommand;
@@ -92,6 +94,7 @@ struct EditCommand;
class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
public InputRouterClient,
public InputAckHandler,
+ public TouchEmulatorClient,
public IPC::Listener {
public:
// routing_id can be MSG_ROUTING_NONE, in which case the next available
@@ -298,7 +301,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
// Forwards the given message to the renderer. These are called by the view
// when it has received a message.
- void ForwardGestureEvent(const blink::WebGestureEvent& gesture_event);
void ForwardGestureEventWithLatencyInfo(
const blink::WebGestureEvent& gesture_event,
const ui::LatencyInfo& ui_latency);
@@ -312,6 +314,13 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
const blink::WebMouseWheelEvent& wheel_event,
const ui::LatencyInfo& ui_latency);
+ // TouchEmulatorClient overrides.
+ virtual void ForwardGestureEvent(
+ const blink::WebGestureEvent& gesture_event) OVERRIDE;
+ virtual void ForwardTouchEvent(
+ const blink::WebTouchEvent& touch_event) OVERRIDE;
+ virtual void SetCursor(const WebCursor& cursor) OVERRIDE;
+
// Queues a synthetic gesture for testing purposes. Invokes the on_complete
// callback when the gesture is finished running.
void QueueSyntheticGesture(
@@ -658,6 +667,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
virtual void OnFocus();
virtual void OnBlur();
void OnSetCursor(const WebCursor& cursor);
+ void OnSetTouchEventEmulationEnabled(bool enabled, bool allow_pinch);
void OnTextInputTypeChanged(ui::TextInputType type,
ui::TextInputMode input_mode,
bool can_compose_inline);
@@ -903,6 +913,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
+ scoped_ptr<TouchEmulator> touch_emulator_;
+
// Receives and handles all input events.
scoped_ptr<InputRouter> input_router_;

Powered by Google App Engine
This is Rietveld 408576698