| 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 #ifndef UI_VIEWS_EVENTS_EVENT_H_ | 5 #ifndef UI_VIEWS_EVENTS_EVENT_H_ |
| 6 #define UI_VIEWS_EVENTS_EVENT_H_ | 6 #define UI_VIEWS_EVENTS_EVENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 type_ == ui::ET_TOUCH_STATIONARY || | 87 type_ == ui::ET_TOUCH_STATIONARY || |
| 88 type_ == ui::ET_TOUCH_CANCELLED; | 88 type_ == ui::ET_TOUCH_CANCELLED; |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool IsScrollGestureEvent() const { | 91 bool IsScrollGestureEvent() const { |
| 92 return type_ == ui::ET_GESTURE_SCROLL_BEGIN || | 92 return type_ == ui::ET_GESTURE_SCROLL_BEGIN || |
| 93 type_ == ui::ET_GESTURE_SCROLL_UPDATE || | 93 type_ == ui::ET_GESTURE_SCROLL_UPDATE || |
| 94 type_ == ui::ET_GESTURE_SCROLL_END; | 94 type_ == ui::ET_GESTURE_SCROLL_END; |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool IsFlingScrollEvent() const { |
| 98 return type_ == ui::ET_SCROLL_FLING_CANCEL || |
| 99 type_ == ui::ET_SCROLL_FLING_START; |
| 100 } |
| 101 |
| 97 protected: | 102 protected: |
| 98 Event(ui::EventType type, int flags); | 103 Event(ui::EventType type, int flags); |
| 99 Event(const NativeEvent& native_event, ui::EventType type, int flags); | 104 Event(const NativeEvent& native_event, ui::EventType type, int flags); |
| 100 Event(const Event& model) | 105 Event(const Event& model) |
| 101 : native_event_(model.native_event()), | 106 : native_event_(model.native_event()), |
| 102 type_(model.type()), | 107 type_(model.type()), |
| 103 time_stamp_(model.time_stamp()), | 108 time_stamp_(model.time_stamp()), |
| 104 flags_(model.flags()) { | 109 flags_(model.flags()) { |
| 105 } | 110 } |
| 106 | 111 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); | 462 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); |
| 458 }; | 463 }; |
| 459 | 464 |
| 460 #if defined(OS_WIN) | 465 #if defined(OS_WIN) |
| 461 int GetModifiersFromKeyState(); | 466 int GetModifiersFromKeyState(); |
| 462 #endif | 467 #endif |
| 463 | 468 |
| 464 } // namespace views | 469 } // namespace views |
| 465 | 470 |
| 466 #endif // UI_VIEWS_EVENTS_EVENT_H_ | 471 #endif // UI_VIEWS_EVENTS_EVENT_H_ |
| OLD | NEW |