Index: content/common/input/generic_event.cc |
diff --git a/content/common/input/generic_event.cc b/content/common/input/generic_event.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7504d2bb78c6d282369b9cb5e06e4c7835d2d855 |
--- /dev/null |
+++ b/content/common/input/generic_event.cc |
@@ -0,0 +1,30 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/common/input/generic_event.h" |
+ |
+#include "ipc/ipc_message.h" |
+ |
+namespace content { |
+ |
+GenericEvent::GenericEvent(int64 id) |
+ : InputEvent(InputEvent::GENERIC, id) {} |
+ |
+scoped_ptr<GenericEvent> GenericEvent::Create() { |
+ return make_scoped_ptr(new GenericEvent(0)); |
+} |
+ |
+scoped_ptr<GenericEvent> GenericEvent::Create( |
+ int64 id, scoped_ptr<IPC::Message> message) { |
+ scoped_ptr<GenericEvent> event(new GenericEvent(id)); |
+ event->message = message.Pass(); |
+ return event.Pass(); |
+} |
+ |
+const GenericEvent* GenericEvent::EventCast(const InputEvent* event) { |
+ DCHECK_EQ(InputEvent::GENERIC, event->type); |
+ return static_cast<const GenericEvent*>(event); |
+} |
+ |
+} // namespace content |