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

Side by Side Diff: content/common/input/generic_event.cc

Issue 19624005: Add InputEvent and EventPacket types for batched input delivery (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate InputEvent types for events based on WebKit::WebInputEvent Created 7 years, 4 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 #include "content/common/input/generic_event.h"
6
7 #include "ipc/ipc_message.h"
8
9 namespace content {
10
11 GenericEvent::GenericEvent(int64 id)
12 : InputEvent(InputEvent::GENERIC, id) {}
13
14 scoped_ptr<GenericEvent> GenericEvent::Create() {
15 return make_scoped_ptr(new GenericEvent(0));
16 }
17
18 scoped_ptr<GenericEvent> GenericEvent::Create(
19 int64 id, scoped_ptr<IPC::Message> message) {
20 scoped_ptr<GenericEvent> event(new GenericEvent(id));
21 event->message = message.Pass();
22 return event.Pass();
23 }
24
25 const GenericEvent* GenericEvent::EventCast(const InputEvent* event) {
26 DCHECK_EQ(InputEvent::GENERIC, event->type);
27 return static_cast<const GenericEvent*>(event);
28 }
29
30 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698