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

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

Issue 67383002: Initial browser-side implementation for touch-action (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tweaks from sadrul/jdduke CR 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 unified diff | Download patch | Annotate | Revision Log
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_TOUCH_EVENT_QUEUE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // When GestureScrollBegin is received, we send a touch cancel to renderer, 55 // When GestureScrollBegin is received, we send a touch cancel to renderer,
56 // route all the following touch events directly to client, and ignore the 56 // route all the following touch events directly to client, and ignore the
57 // ack for the touch cancel. When GestureScrollEnd/GestureFlingStart is 57 // ack for the touch cancel. When GestureScrollEnd/GestureFlingStart is
58 // received, we resume the normal flow of sending touch events to renderer. 58 // received, we resume the normal flow of sending touch events to renderer.
59 void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event); 59 void OnGestureScrollEvent(const GestureEventWithLatencyInfo& gesture_event);
60 60
61 // Empties the queue of touch events. This may result in any number of gesture 61 // Empties the queue of touch events. This may result in any number of gesture
62 // events being sent to the renderer. 62 // events being sent to the renderer.
63 void FlushQueue(); 63 void FlushQueue();
64 64
65 // Returns whether the currently pending touch event (waiting ACK) is for
66 // a touch start event.
67 bool IsPendingAckTouchStart() const;
68
65 // Returns whether the event-queue is empty. 69 // Returns whether the event-queue is empty.
66 bool empty() const WARN_UNUSED_RESULT { 70 bool empty() const WARN_UNUSED_RESULT {
67 return touch_queue_.empty(); 71 return touch_queue_.empty();
68 } 72 }
69 73
70 bool no_touch_to_renderer() const { 74 bool no_touch_to_renderer() const {
71 return no_touch_to_renderer_; 75 return no_touch_to_renderer_;
72 } 76 }
73 77
74 private: 78 private:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // is scrolling. This behaviour is currently enabled only on aura behind 112 // is scrolling. This behaviour is currently enabled only on aura behind
109 // a flag. 113 // a flag.
110 bool no_touch_to_renderer_; 114 bool no_touch_to_renderer_;
111 115
112 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue); 116 DISALLOW_COPY_AND_ASSIGN(TouchEventQueue);
113 }; 117 };
114 118
115 } // namespace content 119 } // namespace content
116 120
117 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_ 121 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EVENT_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698