OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/keycodes/keyboard_code_conversion.h" | 8 #include "ui/base/keycodes/keyboard_code_conversion.h" |
9 #include "ui/views/view.h" | 9 #include "ui/views/view.h" |
10 #include "ui/views/widget/root_view.h" | 10 #include "ui/views/widget/root_view.h" |
11 | 11 |
12 namespace views { | 12 namespace views { |
13 | 13 |
14 //////////////////////////////////////////////////////////////////////////////// | 14 //////////////////////////////////////////////////////////////////////////////// |
15 // MouseEvent, public: | |
16 | |
17 #if !defined(USE_AURA) | |
18 MouseEvent::MouseEvent(const ui::NativeEvent& native_event) | |
19 : LocatedEvent(native_event) { | |
20 } | |
21 #endif | |
22 | |
23 MouseEvent::MouseEvent(const MouseEvent& model, View* source, View* target) | |
24 : LocatedEvent(model, source, target) { | |
25 } | |
26 | |
27 //////////////////////////////////////////////////////////////////////////////// | |
28 // MouseWheelEvent, public: | 15 // MouseWheelEvent, public: |
29 | 16 |
30 #if !defined(USE_AURA) | 17 #if !defined(USE_AURA) |
31 MouseWheelEvent::MouseWheelEvent(const ui::NativeEvent& native_event) | 18 MouseWheelEvent::MouseWheelEvent(const ui::NativeEvent& native_event) |
32 : MouseEvent(native_event), | 19 : MouseEvent(native_event), |
33 offset_(ui::GetMouseWheelOffset(native_event)) { | 20 offset_(ui::GetMouseWheelOffset(native_event)) { |
34 } | 21 } |
35 #endif | 22 #endif |
36 | 23 |
37 MouseWheelEvent::MouseWheelEvent(const ScrollEvent& scroll_event) | 24 MouseWheelEvent::MouseWheelEvent(const ScrollEvent& scroll_event) |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 } | 92 } |
106 | 93 |
107 GestureEventForTest::GestureEventForTest(ui::EventType type, | 94 GestureEventForTest::GestureEventForTest(ui::EventType type, |
108 int x, | 95 int x, |
109 int y, | 96 int y, |
110 int flags) | 97 int flags) |
111 : GestureEvent(type, x, y, flags) { | 98 : GestureEvent(type, x, y, flags) { |
112 } | 99 } |
113 | 100 |
114 } // namespace views | 101 } // namespace views |
OLD | NEW |