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/hit_test.h" | 10 #include "ui/base/hit_test.h" |
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1104 case ui::ET_GESTURE_TAP_DOWN: | 1104 case ui::ET_GESTURE_TAP_DOWN: |
1105 is_touch_down_ = true; | 1105 is_touch_down_ = true; |
1106 // We explicitly don't capture here. Not capturing enables multiple | 1106 // We explicitly don't capture here. Not capturing enables multiple |
1107 // widgets to get tap events at the same time. Views (such as tab | 1107 // widgets to get tap events at the same time. Views (such as tab |
1108 // dragging) may explicitly capture. | 1108 // dragging) may explicitly capture. |
1109 break; | 1109 break; |
1110 | 1110 |
1111 case ui::ET_GESTURE_END: | 1111 case ui::ET_GESTURE_END: |
1112 if (event.delta_x() == 1) { | 1112 if (event.delta_x() == 1) { |
1113 is_touch_down_ = false; | 1113 is_touch_down_ = false; |
1114 ReleaseCapture(); | |
sky
2012/06/11 19:15:56
This is needed for tab dragging.
flackr
2012/06/11 19:34:45
Calling ReleaseCapture here causes the menu to clo
| |
1115 } | 1114 } |
1116 break; | 1115 break; |
1117 | 1116 |
1118 default: | 1117 default: |
1119 break; | 1118 break; |
1120 } | 1119 } |
1121 return GetRootView()->OnGestureEvent(event); | 1120 return GetRootView()->OnGestureEvent(event); |
1122 } | 1121 } |
1123 | 1122 |
1124 bool Widget::ExecuteCommand(int command_id) { | 1123 bool Widget::ExecuteCommand(int command_id) { |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1280 | 1279 |
1281 //////////////////////////////////////////////////////////////////////////////// | 1280 //////////////////////////////////////////////////////////////////////////////// |
1282 // internal::NativeWidgetPrivate, NativeWidget implementation: | 1281 // internal::NativeWidgetPrivate, NativeWidget implementation: |
1283 | 1282 |
1284 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { | 1283 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { |
1285 return this; | 1284 return this; |
1286 } | 1285 } |
1287 | 1286 |
1288 } // namespace internal | 1287 } // namespace internal |
1289 } // namespace views | 1288 } // namespace views |
OLD | NEW |