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

Unified Diff: content/common/input/event_packet.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: Win export fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/input/event_packet.h ('k') | content/common/input/input_event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/input/event_packet.cc
diff --git a/content/common/input/event_packet.cc b/content/common/input/event_packet.cc
new file mode 100644
index 0000000000000000000000000000000000000000..eb1989acce713079b21d709474d357209c8c6fd8
--- /dev/null
+++ b/content/common/input/event_packet.cc
@@ -0,0 +1,22 @@
+// 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/event_packet.h"
+
+#include "content/common/input/input_event.h"
+
+namespace content {
+
+EventPacket::EventPacket() : id_(0) {}
+
+EventPacket::~EventPacket() {}
+
+bool EventPacket::Add(scoped_ptr<InputEvent> event) {
+ if (!event || !event->valid())
+ return false;
+ events_.push_back(event.release());
+ return true;
+}
+
+} // namespace content
« no previous file with comments | « content/common/input/event_packet.h ('k') | content/common/input/input_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698