Index: content/common/input/event_packet.h |
diff --git a/content/common/input/event_packet.h b/content/common/input/event_packet.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..03082f8b43e11fe642fe97b57ede90cce3d68d54 |
--- /dev/null |
+++ b/content/common/input/event_packet.h |
@@ -0,0 +1,42 @@ |
+// 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. |
+ |
+#ifndef CONTENT_COMMON_INPUT_EVENT_PACKET_H_ |
+#define CONTENT_COMMON_INPUT_EVENT_PACKET_H_ |
+ |
+#include <vector> |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "base/memory/scoped_vector.h" |
+#include "content/common/content_export.h" |
+#include "content/common/input/input_event_disposition.h" |
+ |
+namespace content { |
+ |
+class InputEvent; |
+ |
+class CONTENT_EXPORT EventPacket { |
+ public: |
+ EventPacket(); |
+ ~EventPacket(); |
+ |
+ template <typename InputEventType> |
+ void Add(scoped_ptr<InputEventType> event, |
+ InputEventDisposition disposition) { |
+ events.push_back(event.release()); |
+ dispositions.push_back(disposition); |
+ } |
+ |
+ int64 id; |
+ ScopedVector<InputEvent> events; |
+ std::vector<InputEventDisposition> dispositions; |
+ |
+private: |
+ DISALLOW_COPY_AND_ASSIGN(EventPacket); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_COMMON_INPUT_EVENT_PACKET_H_ |