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

Unified Diff: content/browser/renderer_host/input/immediate_input_router.h

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/input/immediate_input_router.h
diff --git a/content/browser/renderer_host/input/immediate_input_router.h b/content/browser/renderer_host/input/immediate_input_router.h
index cc760bddb1d196d2aed17ef2fa4597ff9ed05981..22f2b934420e4c83de343ec46329dae865f93895 100644
--- a/content/browser/renderer_host/input/immediate_input_router.h
+++ b/content/browser/renderer_host/input/immediate_input_router.h
@@ -15,6 +15,7 @@
#include "content/browser/renderer_host/input/touch_event_queue.h"
#include "content/browser/renderer_host/input/touchpad_tap_suppression_controller.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/common/touch_action.h"
namespace IPC {
class Sender;
@@ -123,6 +124,7 @@ private:
void OnMsgMoveCaretAck();
void OnSelectRangeAck();
void OnHasTouchEventHandlers(bool has_handlers);
+ void OnSetTouchAction(int touch_id, content::TouchAction touchAction);
// Indicates the source of an ack provided to |ProcessInputEventAck()|.
// The source is tracked by |current_ack_source_|, which aids in ack routing.
@@ -167,7 +169,7 @@ private:
void ProcessAckForOverscroll(const WebKit::WebInputEvent& event,
InputEventAckState ack_result);
- void HandleGestureScroll(const GestureEventWithLatencyInfo& gesture_event);
+ bool FilterTouchAction(const GestureEventWithLatencyInfo& gesture_event);
void SimulateTouchGestureWithMouse(
const MouseEventWithLatencyInfo& mouse_event);
@@ -234,6 +236,12 @@ private:
// not sent to the renderer.
bool has_touch_handler_;
+ // Whether GestureScroll events should be discarded due to touch-action.
+ bool drop_scroll_gesture_events_;
+
+ // What touch actions are currently permitted.
+ content::TouchAction allowed_touch_action_;
+
// The source of the ack within the scope of |ProcessInputEventAck()|.
// Defaults to ACK_SOURCE_NONE.
AckSource current_ack_source_;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/immediate_input_router.cc » ('j') | content/common/view_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698