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

Side by Side Diff: content/browser/renderer_host/input/input_router_impl.h

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweak include for moved synthetic_web_input_event_builders.h Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "content/browser/renderer_host/input/gesture_event_filter.h" 13 #include "content/browser/renderer_host/input/gesture_event_filter.h"
14 #include "content/browser/renderer_host/input/input_router.h" 14 #include "content/browser/renderer_host/input/input_router.h"
15 #include "content/browser/renderer_host/input/touch_action_filter.h"
15 #include "content/browser/renderer_host/input/touch_event_queue.h" 16 #include "content/browser/renderer_host/input/touch_event_queue.h"
16 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h" 17 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle r.h"
17 #include "content/public/browser/native_web_keyboard_event.h" 18 #include "content/public/browser/native_web_keyboard_event.h"
18 19
19 namespace IPC { 20 namespace IPC {
20 class Sender; 21 class Sender;
21 } 22 }
22 23
23 namespace ui { 24 namespace ui {
24 struct LatencyInfo; 25 struct LatencyInfo;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 const ui::LatencyInfo& latency_info, 116 const ui::LatencyInfo& latency_info,
116 bool is_keyboard_shortcut); 117 bool is_keyboard_shortcut);
117 118
118 // IPC message handlers 119 // IPC message handlers
119 void OnInputEventAck(blink::WebInputEvent::Type event_type, 120 void OnInputEventAck(blink::WebInputEvent::Type event_type,
120 InputEventAckState ack_result, 121 InputEventAckState ack_result,
121 const ui::LatencyInfo& latency_info); 122 const ui::LatencyInfo& latency_info);
122 void OnMsgMoveCaretAck(); 123 void OnMsgMoveCaretAck();
123 void OnSelectRangeAck(); 124 void OnSelectRangeAck();
124 void OnHasTouchEventHandlers(bool has_handlers); 125 void OnHasTouchEventHandlers(bool has_handlers);
126 void OnSetTouchAction(content::TouchAction touch_action);
125 127
126 // Indicates the source of an ack provided to |ProcessInputEventAck()|. 128 // Indicates the source of an ack provided to |ProcessInputEventAck()|.
127 // The source is tracked by |current_ack_source_|, which aids in ack routing. 129 // The source is tracked by |current_ack_source_|, which aids in ack routing.
128 enum AckSource { 130 enum AckSource {
129 RENDERER, 131 RENDERER,
130 CLIENT, 132 CLIENT,
131 OVERSCROLL_CONTROLLER, 133 OVERSCROLL_CONTROLLER,
132 IGNORING_DISPOSITION, 134 IGNORING_DISPOSITION,
133 ACK_SOURCE_NONE 135 ACK_SOURCE_NONE
134 }; 136 };
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // then touch events are sent to the renderer. Otherwise, the touch events are 235 // then touch events are sent to the renderer. Otherwise, the touch events are
234 // not sent to the renderer. 236 // not sent to the renderer.
235 bool has_touch_handler_; 237 bool has_touch_handler_;
236 238
237 // The source of the ack within the scope of |ProcessInputEventAck()|. 239 // The source of the ack within the scope of |ProcessInputEventAck()|.
238 // Defaults to ACK_SOURCE_NONE. 240 // Defaults to ACK_SOURCE_NONE.
239 AckSource current_ack_source_; 241 AckSource current_ack_source_;
240 242
241 scoped_ptr<TouchEventQueue> touch_event_queue_; 243 scoped_ptr<TouchEventQueue> touch_event_queue_;
242 scoped_ptr<GestureEventFilter> gesture_event_filter_; 244 scoped_ptr<GestureEventFilter> gesture_event_filter_;
245 TouchActionFilter touch_action_filter_;
243 246
244 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); 247 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
245 }; 248 };
246 249
247 } // namespace content 250 } // namespace content
248 251
249 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 252 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698