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

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

Issue 26923002: Consolidate WebInputEvent coalescing logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 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
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 WebInputEventTraits { 15 class WebInputEventTraits {
16 public: 16 public:
17 static size_t GetSize(WebKit::WebInputEvent::Type type); 17 static size_t GetSize(WebKit::WebInputEvent::Type type);
18 static ScopedWebInputEvent Clone(const WebKit::WebInputEvent& event); 18 static ScopedWebInputEvent Clone(const WebKit::WebInputEvent& event);
19 static void Delete(WebKit::WebInputEvent* event); 19 static void Delete(WebKit::WebInputEvent* event);
20 static bool CanCoalesce(const WebKit::WebInputEvent& event_to_coalesce,
21 const WebKit::WebInputEvent& event);
22 static void Coalesce(const WebKit::WebInputEvent& event_to_coalesce,
23 WebKit::WebInputEvent* event);
20 }; 24 };
21 25
22 } // namespace content 26 } // namespace content
23 27
24 #endif // CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_ 28 #endif // CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/touch_event_queue.cc ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698