| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "views/event.h" | 5 #include "views/event.h" |
| 6 | 6 |
| 7 #include "views/view.h" | 7 #include "views/view.h" |
| 8 | 8 |
| 9 namespace views { | 9 namespace views { |
| 10 | 10 |
| 11 Event::Event(EventType type, int flags) | 11 Event::Event(EventType type, int flags) |
| 12 : type_(type), | 12 : type_(type), |
| 13 #if defined(OS_WIN) | 13 time_stamp_(base::Time::NowFromSystemTime()), |
| 14 time_stamp_(GetTickCount()), | |
| 15 #else | |
| 16 time_stamp_(0), | |
| 17 #endif | |
| 18 flags_(flags) { | 14 flags_(flags) { |
| 19 } | 15 } |
| 20 | 16 |
| 21 LocatedEvent::LocatedEvent(const LocatedEvent& model, View* from, View* to) | 17 LocatedEvent::LocatedEvent(const LocatedEvent& model, View* from, View* to) |
| 22 : Event(model), | 18 : Event(model), |
| 23 location_(model.location_) { | 19 location_(model.location_) { |
| 24 if (to) | 20 if (to) |
| 25 View::ConvertPointToView(from, to, &location_); | 21 View::ConvertPointToView(from, to, &location_); |
| 26 } | 22 } |
| 27 | 23 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 touch_id_(touch_id) { | 62 touch_id_(touch_id) { |
| 67 } | 63 } |
| 68 | 64 |
| 69 TouchEvent::TouchEvent(const TouchEvent& model, View* from, View* to) | 65 TouchEvent::TouchEvent(const TouchEvent& model, View* from, View* to) |
| 70 : LocatedEvent(model, from, to), | 66 : LocatedEvent(model, from, to), |
| 71 touch_id_(model.touch_id_) { | 67 touch_id_(model.touch_id_) { |
| 72 } | 68 } |
| 73 #endif | 69 #endif |
| 74 | 70 |
| 75 } // namespace views | 71 } // namespace views |
| OLD | NEW |