OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/events/gesture_event_details.h" | 5 #include "ui/events/gesture_event_details.h" |
6 | 6 |
7 namespace ui { | 7 namespace ui { |
8 | 8 |
9 GestureEventDetails::GestureEventDetails() | 9 GestureEventDetails::GestureEventDetails() |
10 : type_(ET_UNKNOWN), touch_points_(0), oldest_touch_id_(-1) { | 10 : type_(ET_UNKNOWN), touch_points_(0), oldest_touch_id_(-1) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 default: | 59 default: |
60 if (delta_x != 0.f || delta_y != 0.f) { | 60 if (delta_x != 0.f || delta_y != 0.f) { |
61 DLOG(WARNING) << "A gesture event (" << type << ") had unknown data: (" | 61 DLOG(WARNING) << "A gesture event (" << type << ") had unknown data: (" |
62 << delta_x << "," << delta_y; | 62 << delta_x << "," << delta_y; |
63 } | 63 } |
64 break; | 64 break; |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
| 68 GestureEventDetails::GestureEventDetails(const GestureEventDetails& details) |
| 69 : type_(details.type_), |
| 70 touch_points_(details.touch_points_), |
| 71 bounding_box_(details.bounding_box_), |
| 72 oldest_touch_id_(details.oldest_touch_id_) { |
| 73 memcpy(&data, &details.data, sizeof(details.data)); |
| 74 } |
| 75 |
68 GestureEventDetails::Details::Details() { | 76 GestureEventDetails::Details::Details() { |
69 memset(this, 0, sizeof(Details)); | 77 memset(this, 0, sizeof(Details)); |
70 } | 78 } |
71 | 79 |
72 } // namespace ui | 80 } // namespace ui |
OLD | NEW |