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

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

Issue 143153004: [Reland] Fix crash when accidentally touching the screen during a multi window resize (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/native_widget_aura_unittest.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/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1219 void Widget::OnGestureEvent(ui::GestureEvent* event) { 1219 void Widget::OnGestureEvent(ui::GestureEvent* event) {
1220 switch (event->type()) { 1220 switch (event->type()) {
1221 case ui::ET_GESTURE_TAP_DOWN: 1221 case ui::ET_GESTURE_TAP_DOWN:
1222 is_touch_down_ = true; 1222 is_touch_down_ = true;
1223 // We explicitly don't capture here. Not capturing enables multiple 1223 // We explicitly don't capture here. Not capturing enables multiple
1224 // widgets to get tap events at the same time. Views (such as tab 1224 // widgets to get tap events at the same time. Views (such as tab
1225 // dragging) may explicitly capture. 1225 // dragging) may explicitly capture.
1226 break; 1226 break;
1227 1227
1228 case ui::ET_GESTURE_END: 1228 case ui::ET_GESTURE_END:
1229 if (event->details().touch_points() == 1) { 1229 if (event->details().touch_points() == 1)
1230 is_touch_down_ = false; 1230 is_touch_down_ = false;
1231 if (auto_release_capture_)
1232 ReleaseCapture();
1233 }
1234 break; 1231 break;
1235 1232
1236 default: 1233 default:
1237 break; 1234 break;
1238 } 1235 }
1239 static_cast<internal::RootView*>(GetRootView())->DispatchGestureEvent(event); 1236 static_cast<internal::RootView*>(GetRootView())->DispatchGestureEvent(event);
1240 } 1237 }
1241 1238
1242 bool Widget::ExecuteCommand(int command_id) { 1239 bool Widget::ExecuteCommand(int command_id) {
1243 return widget_delegate_->ExecuteWindowsCommand(command_id); 1240 return widget_delegate_->ExecuteWindowsCommand(command_id);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 1431
1435 //////////////////////////////////////////////////////////////////////////////// 1432 ////////////////////////////////////////////////////////////////////////////////
1436 // internal::NativeWidgetPrivate, NativeWidget implementation: 1433 // internal::NativeWidgetPrivate, NativeWidget implementation:
1437 1434
1438 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1435 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1439 return this; 1436 return this;
1440 } 1437 }
1441 1438
1442 } // namespace internal 1439 } // namespace internal
1443 } // namespace views 1440 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698