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

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

Issue 593883002: [exp] Browser-side fling. Base URL: https://chromium.googlesource.com/chromium/src.git@fling-curve-config-remove
Patch Set: . Created 6 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
« 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_queue.h" 13 #include "content/browser/renderer_host/input/gesture_event_queue.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_action_filter.h"
16 #include "content/browser/renderer_host/input/touch_event_queue.h" 16 #include "content/browser/renderer_host/input/touch_event_queue.h"
17 #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"
18 #include "content/common/input/input_event_stream_validator.h" 18 #include "content/common/input/input_event_stream_validator.h"
19 #include "content/public/browser/native_web_keyboard_event.h" 19 #include "content/public/browser/native_web_keyboard_event.h"
20 20
21 struct InputHostMsg_HandleInputEvent_ACK_Params; 21 struct InputHostMsg_HandleInputEvent_ACK_Params;
22 22
23 #if defined(OS_ANDROID)
24 namespace gfx {
25 class Scroller;
26 }
27 #endif
28
23 namespace IPC { 29 namespace IPC {
24 class Sender; 30 class Sender;
25 } 31 }
26 32
27 namespace ui { 33 namespace ui {
34 class FlingCurve;
28 struct LatencyInfo; 35 struct LatencyInfo;
29 } 36 }
30 37
31 namespace content { 38 namespace content {
32 39
40 class Flinger {
41 public:
42 explicit Flinger(const blink::WebGestureEvent& fling_event);
43 virtual ~Flinger();
44
45 blink::WebGestureEvent GetNextScrollEvent();
46
47 private:
48 blink::WebGestureEvent fling_event_;
49 #if defined(OS_ANDROID)
50 scoped_ptr<gfx::Scroller> scroller_;
51 #else
52 scoped_ptr<ui::FlingCurve> fling_curve_;
53 #endif
54
55 DISALLOW_COPY_AND_ASSIGN(Flinger);
56 };
57
33 class InputAckHandler; 58 class InputAckHandler;
34 class InputRouterClient; 59 class InputRouterClient;
35 class OverscrollController; 60 class OverscrollController;
36 struct DidOverscrollParams; 61 struct DidOverscrollParams;
37 62
38 // A default implementation for browser input event routing. 63 // A default implementation for browser input event routing.
39 class CONTENT_EXPORT InputRouterImpl 64 class CONTENT_EXPORT InputRouterImpl
40 : public NON_EXPORTED_BASE(InputRouter), 65 : public NON_EXPORTED_BASE(InputRouter),
41 public NON_EXPORTED_BASE(GestureEventQueueClient), 66 public NON_EXPORTED_BASE(GestureEventQueueClient),
42 public NON_EXPORTED_BASE(TouchEventQueueClient), 67 public NON_EXPORTED_BASE(TouchEventQueueClient),
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // Whether a call to |Flush()| has yet been accompanied by a |DidFlush()| call 294 // Whether a call to |Flush()| has yet been accompanied by a |DidFlush()| call
270 // to the client_ after all events have been dispatched/acked. 295 // to the client_ after all events have been dispatched/acked.
271 bool flush_requested_; 296 bool flush_requested_;
272 297
273 TouchEventQueue touch_event_queue_; 298 TouchEventQueue touch_event_queue_;
274 GestureEventQueue gesture_event_queue_; 299 GestureEventQueue gesture_event_queue_;
275 TouchActionFilter touch_action_filter_; 300 TouchActionFilter touch_action_filter_;
276 InputEventStreamValidator input_stream_validator_; 301 InputEventStreamValidator input_stream_validator_;
277 InputEventStreamValidator output_stream_validator_; 302 InputEventStreamValidator output_stream_validator_;
278 303
304 scoped_ptr<Flinger> flinger_;
305
279 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl); 306 DISALLOW_COPY_AND_ASSIGN(InputRouterImpl);
280 }; 307 };
281 308
282 } // namespace content 309 } // namespace content
283 310
284 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_INPUT_ROUTER_IMPL_H_ 311 #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