Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: ui/views/widget/widget.cc

Issue 10533029: Fix TAP_DOWN gesture event: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 ui::GestureStatus Widget::OnGestureEvent(const GestureEvent& event) { 1109 ui::GestureStatus Widget::OnGestureEvent(const GestureEvent& event) {
1110 ScopedEvent scoped(this, event); 1110 ScopedEvent scoped(this, event);
1111 switch (event.type()) { 1111 switch (event.type()) {
1112 case ui::ET_GESTURE_TAP_DOWN: 1112 case ui::ET_GESTURE_TAP_DOWN:
1113 is_touch_down_ = true; 1113 is_touch_down_ = true;
1114 // We explicitly don't capture here. Not capturing enables multiple 1114 // We explicitly don't capture here. Not capturing enables multiple
1115 // widgets to get tap events at the same time. Views (such as tab 1115 // widgets to get tap events at the same time. Views (such as tab
1116 // dragging) may explicitly capture. 1116 // dragging) may explicitly capture.
1117 break; 1117 break;
1118 1118
1119 case ui::ET_GESTURE_TAP_UP: 1119 case ui::ET_GESTURE_END:
1120 is_touch_down_ = false; 1120 is_touch_down_ = false;
sadrul 2012/06/06 19:51:14 Oh. This is wrong. This should check for delta_x()
varunjain 2012/06/06 21:52:53 Done.
1121 ReleaseCapture(); 1121 ReleaseCapture();
1122 break; 1122 break;
1123 1123
1124 default: 1124 default:
1125 break; 1125 break;
1126 } 1126 }
1127 return GetRootView()->OnGestureEvent(event); 1127 return GetRootView()->OnGestureEvent(event);
1128 } 1128 }
1129 1129
1130 bool Widget::ExecuteCommand(int command_id) { 1130 bool Widget::ExecuteCommand(int command_id) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 1286
1287 //////////////////////////////////////////////////////////////////////////////// 1287 ////////////////////////////////////////////////////////////////////////////////
1288 // internal::NativeWidgetPrivate, NativeWidget implementation: 1288 // internal::NativeWidgetPrivate, NativeWidget implementation:
1289 1289
1290 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1290 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1291 return this; 1291 return this;
1292 } 1292 }
1293 1293
1294 } // namespace internal 1294 } // namespace internal
1295 } // namespace views 1295 } // namespace views
OLDNEW
« ui/base/gestures/gesture_sequence.cc ('K') | « ui/views/widget/root_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698