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

Side by Side Diff: content/common/input/web_input_event_traits.h

Issue 171283002: Always reset touch action at the beginning of a new gesture sequence (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address rbyers' comments. 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
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_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ 5 #ifndef CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
6 #define CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ 6 #define CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "content/common/input/scoped_web_input_event.h" 9 #include "content/common/input/scoped_web_input_event.h"
10 #include "third_party/WebKit/public/web/WebInputEvent.h" 10 #include "third_party/WebKit/public/web/WebInputEvent.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // Utility class for performing operations on and with WebInputEvents. 14 // Utility class for performing operations on and with WebInputEvents.
15 class CONTENT_EXPORT WebInputEventTraits { 15 class CONTENT_EXPORT WebInputEventTraits {
16 public: 16 public:
17 static const char* GetName(blink::WebInputEvent::Type type); 17 static const char* GetName(blink::WebInputEvent::Type type);
18 static size_t GetSize(blink::WebInputEvent::Type type); 18 static size_t GetSize(blink::WebInputEvent::Type type);
19 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event); 19 static ScopedWebInputEvent Clone(const blink::WebInputEvent& event);
20 static void Delete(blink::WebInputEvent* event); 20 static void Delete(blink::WebInputEvent* event);
21 static bool CanCoalesce(const blink::WebInputEvent& event_to_coalesce, 21 static bool CanCoalesce(const blink::WebInputEvent& event_to_coalesce,
22 const blink::WebInputEvent& event); 22 const blink::WebInputEvent& event);
23 static void Coalesce(const blink::WebInputEvent& event_to_coalesce, 23 static void Coalesce(const blink::WebInputEvent& event_to_coalesce,
24 blink::WebInputEvent* event); 24 blink::WebInputEvent* event);
25 static bool IgnoresAckDisposition(blink::WebInputEvent::Type type); 25 static bool IgnoresAckDisposition(blink::WebInputEvent::Type type);
26 static bool IsNewTouchSequence(const blink::WebTouchEvent& event);
jdduke (slow) 2014/02/21 15:45:33 I wonder if it's worth having a WebTouchEventTrait
tdresser 2014/02/21 19:14:03 Done.
26 }; 27 };
27 28
28 } // namespace content 29 } // namespace content
29 30
30 #endif // CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ 31 #endif // CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698