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

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: patch 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
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 if (event.delta_x() == 1) {
sky 2012/06/07 02:43:54 I don't understand the delta_x check? Why wouldn't
sadrul 2012/06/07 03:04:55 delta_x() means the number of active points for GE
1121 ReleaseCapture(); 1121 is_touch_down_ = false;
1122 ReleaseCapture();
1123 }
1122 break; 1124 break;
1123 1125
1124 default: 1126 default:
1125 break; 1127 break;
1126 } 1128 }
1127 return GetRootView()->OnGestureEvent(event); 1129 return GetRootView()->OnGestureEvent(event);
1128 } 1130 }
1129 1131
1130 bool Widget::ExecuteCommand(int command_id) { 1132 bool Widget::ExecuteCommand(int command_id) {
1131 return widget_delegate_->ExecuteWindowsCommand(command_id); 1133 return widget_delegate_->ExecuteWindowsCommand(command_id);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 1288
1287 //////////////////////////////////////////////////////////////////////////////// 1289 ////////////////////////////////////////////////////////////////////////////////
1288 // internal::NativeWidgetPrivate, NativeWidget implementation: 1290 // internal::NativeWidgetPrivate, NativeWidget implementation:
1289 1291
1290 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1292 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1291 return this; 1293 return this;
1292 } 1294 }
1293 1295
1294 } // namespace internal 1296 } // namespace internal
1295 } // namespace views 1297 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698