| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 | 5 |
| 6 #ifndef UI_VIEWS_EVENTS_EVENT_H_ | 6 #ifndef UI_VIEWS_EVENTS_EVENT_H_ |
| 7 #define UI_VIEWS_EVENTS_EVENT_H_ | 7 #define UI_VIEWS_EVENTS_EVENT_H_ |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 type_ == ui::ET_TOUCH_STATIONARY || | 84 type_ == ui::ET_TOUCH_STATIONARY || |
| 85 type_ == ui::ET_TOUCH_CANCELLED; | 85 type_ == ui::ET_TOUCH_CANCELLED; |
| 86 } | 86 } |
| 87 | 87 |
| 88 bool IsScrollGestureEvent() const { | 88 bool IsScrollGestureEvent() const { |
| 89 return type_ == ui::ET_GESTURE_SCROLL_BEGIN || | 89 return type_ == ui::ET_GESTURE_SCROLL_BEGIN || |
| 90 type_ == ui::ET_GESTURE_SCROLL_UPDATE || | 90 type_ == ui::ET_GESTURE_SCROLL_UPDATE || |
| 91 type_ == ui::ET_GESTURE_SCROLL_END; | 91 type_ == ui::ET_GESTURE_SCROLL_END; |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool IsFlingScrollEvent() const { |
| 95 return type_ == ui::ET_SCROLL_FLING_CANCEL || |
| 96 type_ == ui::ET_SCROLL_FLING_START; |
| 97 } |
| 98 |
| 94 protected: | 99 protected: |
| 95 Event(ui::EventType type, int flags); | 100 Event(ui::EventType type, int flags); |
| 96 Event(const NativeEvent& native_event, ui::EventType type, int flags); | 101 Event(const NativeEvent& native_event, ui::EventType type, int flags); |
| 97 Event(const Event& model) | 102 Event(const Event& model) |
| 98 : native_event_(model.native_event()), | 103 : native_event_(model.native_event()), |
| 99 type_(model.type()), | 104 type_(model.type()), |
| 100 time_stamp_(model.time_stamp()), | 105 time_stamp_(model.time_stamp()), |
| 101 flags_(model.flags()) { | 106 flags_(model.flags()) { |
| 102 } | 107 } |
| 103 | 108 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); | 459 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); |
| 455 }; | 460 }; |
| 456 | 461 |
| 457 #if defined(OS_WIN) | 462 #if defined(OS_WIN) |
| 458 int GetModifiersFromKeyState(); | 463 int GetModifiersFromKeyState(); |
| 459 #endif | 464 #endif |
| 460 | 465 |
| 461 } // namespace views | 466 } // namespace views |
| 462 | 467 |
| 463 #endif // UI_VIEWS_EVENTS_EVENT_H_ | 468 #endif // UI_VIEWS_EVENTS_EVENT_H_ |
| OLD | NEW |