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

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

Issue 19624005: Add InputEvent and EventPacket types for batched input delivery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 3 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
(Empty)
1 // Copyright (c) 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_PLATFORM_INPUT_EVENT_H_
6 #define CONTENT_COMMON_INPUT_WEB_PLATFORM_INPUT_EVENT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h"
10 #include "content/common/input/input_event.h"
11 #include "ui/base/latency_info.h"
12
13 namespace WebKit {
14 class WebInputEvent;
15 }
16
17 namespace content {
18
19 // An event based on a WebKit::WebInputEvent.
20 class CONTENT_EXPORT WebPlatformInputEvent : public InputEvent {
21 public:
22 static scoped_ptr<WebPlatformInputEvent> Create();
23 static scoped_ptr<WebPlatformInputEvent> Create(
24 int64 id,
25 const WebKit::WebInputEvent& event,
26 const ui::LatencyInfo& latency_info,
27 bool is_keyboard_shortcut,
28 bool creates_followup_events);
29
30 virtual ~WebPlatformInputEvent();
31
32 void Initialize(const WebKit::WebInputEvent& event,
33 const ui::LatencyInfo& latency_info,
34 bool is_keyboard_shortcut);
35
36 // WebKit::WebInputEvent does not provide a virtual destructor.
37 struct WebInputEventDeleter {
38 WebInputEventDeleter();
39 void operator()(WebKit::WebInputEvent* event) const;
40 };
41 typedef scoped_ptr<WebKit::WebInputEvent,
42 WebInputEventDeleter> ScopedWebInputEvent;
43
44 ScopedWebInputEvent event;
45 ui::LatencyInfo latency_info;
46 bool is_keyboard_shortcut;
47
48 static const WebPlatformInputEvent* EventCast(const InputEvent* event);
49
50 protected:
51 explicit WebPlatformInputEvent(AckType ack_type, int64 id);
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_COMMON_INPUT_WEB_PLATFORM_INPUT_EVENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698