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

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

Issue 140253005: Add touch scrolling modes experimental flags (DEPRECATED) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address my own nits. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_event_packet.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_GESTURE_EVENT_PACKET_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "third_party/WebKit/public/web/WebInputEvent.h" 9 #include "third_party/WebKit/public/web/WebInputEvent.h"
10 10
(...skipping 17 matching lines...) Expand all
28 static GestureEventPacket FromTouch(const blink::WebTouchEvent& event); 28 static GestureEventPacket FromTouch(const blink::WebTouchEvent& event);
29 static GestureEventPacket FromTouchTimeout( 29 static GestureEventPacket FromTouchTimeout(
30 const blink::WebGestureEvent& event); 30 const blink::WebGestureEvent& event);
31 31
32 void Push(const blink::WebGestureEvent& gesture); 32 void Push(const blink::WebGestureEvent& gesture);
33 33
34 const blink::WebGestureEvent& gesture(size_t i) const { return gestures_[i]; } 34 const blink::WebGestureEvent& gesture(size_t i) const { return gestures_[i]; }
35 size_t gesture_count() const { return gesture_count_; } 35 size_t gesture_count() const { return gesture_count_; }
36 GestureSource gesture_source() const { return gesture_source_; } 36 GestureSource gesture_source() const { return gesture_source_; }
37 37
38 // Returns true if this packet only contains gestures which are logically
39 // local to the event that generated them. Dropping such a packet won't
40 // affect the semantics of subsequent packets.
41 bool is_independent() const { return is_independent_; }
42
38 private: 43 private:
39 explicit GestureEventPacket(GestureSource source); 44 explicit GestureEventPacket(GestureSource source);
40 45
41 enum { kMaxGesturesPerTouch = 5 }; 46 enum { kMaxGesturesPerTouch = 5 };
42 blink::WebGestureEvent gestures_[kMaxGesturesPerTouch]; 47 blink::WebGestureEvent gestures_[kMaxGesturesPerTouch];
43 size_t gesture_count_; 48 size_t gesture_count_;
44 GestureSource gesture_source_; 49 GestureSource gesture_source_;
50 bool is_independent_;
45 }; 51 };
46 52
47 } // namespace content 53 } // namespace content
48 54
49 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_ 55 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_GESTURE_EVENT_PACKET_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_event_packet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698