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

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

Issue 10912063: events: Get rid of GestureStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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/widget.h ('k') | ui/views/widget/x11_desktop_window_move_client.h » ('j') | 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/event.h" 10 #include "ui/base/event.h"
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/widget.h ('k') | ui/views/widget/x11_desktop_window_move_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698