| 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/widget/widget.h" | 5 #include "ui/views/widget/widget.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "ui/base/event.h" | 10 #include "ui/base/event.h" |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 GetRootView()->OnMouseCaptureLost(); | 1119 GetRootView()->OnMouseCaptureLost(); |
| 1120 is_touch_down_ = false; | 1120 is_touch_down_ = false; |
| 1121 is_mouse_button_pressed_ = false; | 1121 is_mouse_button_pressed_ = false; |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 ui::TouchStatus Widget::OnTouchEvent(const ui::TouchEvent& event) { | 1124 ui::TouchStatus Widget::OnTouchEvent(const ui::TouchEvent& event) { |
| 1125 ScopedEvent scoped(this, event); | 1125 ScopedEvent scoped(this, event); |
| 1126 return GetRootView()->OnTouchEvent(event); | 1126 return GetRootView()->OnTouchEvent(event); |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 ui::GestureStatus Widget::OnGestureEvent(const ui::GestureEvent& event) { | 1129 ui::EventResult Widget::OnGestureEvent(const ui::GestureEvent& event) { |
| 1130 ScopedEvent scoped(this, event); | 1130 ScopedEvent scoped(this, event); |
| 1131 switch (event.type()) { | 1131 switch (event.type()) { |
| 1132 case ui::ET_GESTURE_TAP_DOWN: | 1132 case ui::ET_GESTURE_TAP_DOWN: |
| 1133 is_touch_down_ = true; | 1133 is_touch_down_ = true; |
| 1134 // We explicitly don't capture here. Not capturing enables multiple | 1134 // We explicitly don't capture here. Not capturing enables multiple |
| 1135 // widgets to get tap events at the same time. Views (such as tab | 1135 // widgets to get tap events at the same time. Views (such as tab |
| 1136 // dragging) may explicitly capture. | 1136 // dragging) may explicitly capture. |
| 1137 break; | 1137 break; |
| 1138 | 1138 |
| 1139 case ui::ET_GESTURE_END: | 1139 case ui::ET_GESTURE_END: |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 | 1327 |
| 1328 //////////////////////////////////////////////////////////////////////////////// | 1328 //////////////////////////////////////////////////////////////////////////////// |
| 1329 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1329 // internal::NativeWidgetPrivate, NativeWidget implementation: |
| 1330 | 1330 |
| 1331 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1331 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
| 1332 return this; | 1332 return this; |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 } // namespace internal | 1335 } // namespace internal |
| 1336 } // namespace views | 1336 } // namespace views |
| OLD | NEW |