- add sources.
[platform/framework/web/crosswalk.git] / src / content / common / input / web_input_event_traits.h
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
6 #define CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_
7
8 #include "base/basictypes.h"
9 #include "content/common/input/scoped_web_input_event.h"
10 #include "third_party/WebKit/public/web/WebInputEvent.h"
11
12 namespace content {
13
14 // Utility class for performing operations on and with WebInputEvents.
15 class WebInputEventTraits {
16  public:
17   static const char* GetName(WebKit::WebInputEvent::Type type);
18   static size_t GetSize(WebKit::WebInputEvent::Type type);
19   static ScopedWebInputEvent Clone(const WebKit::WebInputEvent& event);
20   static void Delete(WebKit::WebInputEvent* event);
21   static bool CanCoalesce(const WebKit::WebInputEvent& event_to_coalesce,
22                           const WebKit::WebInputEvent& event);
23   static void Coalesce(const WebKit::WebInputEvent& event_to_coalesce,
24                        WebKit::WebInputEvent* event);
25 };
26
27 }  // namespace content
28
29 #endif  // CONTENT_COMMON_INPUT_WEB_INPUT_EVENT_TRAITS_H_