OLD | NEW |
(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_EVENT_PACKET_H_ |
| 6 #define CONTENT_COMMON_INPUT_EVENT_PACKET_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/scoped_vector.h" |
| 13 #include "content/common/content_export.h" |
| 14 #include "content/common/input/input_event_disposition.h" |
| 15 |
| 16 namespace content { |
| 17 |
| 18 class InputEvent; |
| 19 |
| 20 class CONTENT_EXPORT EventPacket { |
| 21 public: |
| 22 EventPacket(); |
| 23 ~EventPacket(); |
| 24 |
| 25 template <typename InputEventType> |
| 26 void Add(scoped_ptr<InputEventType> event, |
| 27 InputEventDisposition disposition) { |
| 28 events.push_back(event.release()); |
| 29 dispositions.push_back(disposition); |
| 30 } |
| 31 |
| 32 int64 id; |
| 33 ScopedVector<InputEvent> events; |
| 34 std::vector<InputEventDisposition> dispositions; |
| 35 |
| 36 private: |
| 37 DISALLOW_COPY_AND_ASSIGN(EventPacket); |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_COMMON_INPUT_EVENT_PACKET_H_ |
OLD | NEW |