Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/events/event.h" | 5 #include "ui/views/events/event.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "ui/aura/event.h" | 8 #include "ui/aura/event.h" |
| 9 #include "ui/base/keycodes/keyboard_code_conversion.h" | 9 #include "ui/base/keycodes/keyboard_code_conversion.h" |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 } | 52 } |
| 53 | 53 |
| 54 //////////////////////////////////////////////////////////////////////////////// | 54 //////////////////////////////////////////////////////////////////////////////// |
| 55 // MouseWheelEvent, public: | 55 // MouseWheelEvent, public: |
| 56 | 56 |
| 57 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event) | 57 MouseWheelEvent::MouseWheelEvent(const NativeEvent& native_event) |
| 58 : MouseEvent(native_event), | 58 : MouseEvent(native_event), |
| 59 offset_(ui::GetMouseWheelOffset(native_event->native_event())) { | 59 offset_(ui::GetMouseWheelOffset(native_event->native_event())) { |
| 60 } | 60 } |
| 61 | 61 |
| 62 ScrollEvent::ScrollEvent(const NativeEvent& native_event) | |
| 63 : MouseEvent(native_event) { | |
| 64 ui::GetScrollOffsets(native_event->native_event(), &x_offset_, &y_offset_); | |
|
Daniel Erat
2011/12/14 21:49:07
nit: worthwhile CHECK-ing that this returns true?
DaveMoore
2011/12/15 17:07:21
Done.
| |
| 65 } | |
| 66 | |
| 62 } // namespace views | 67 } // namespace views |
| OLD | NEW |