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

Side by Side Diff: views/touchui/gesture_manager.cc

Issue 7540002: Fix a few issues with touch-events and views-desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « views/events/event.h ('k') | views/widget/native_widget_view.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/touchui/gesture_manager.h" 5 #include "views/touchui/gesture_manager.h"
6 #ifndef NDEBUG 6 #ifndef NDEBUG
7 #include <iostream> 7 #include <iostream>
8 #endif 8 #endif
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 14 matching lines...) Expand all
25 View* source, 25 View* source,
26 ui::TouchStatus status) { 26 ui::TouchStatus status) {
27 if (status != ui::TOUCH_STATUS_UNKNOWN) 27 if (status != ui::TOUCH_STATUS_UNKNOWN)
28 return false; // The event was consumed by a touch sequence. 28 return false; // The event was consumed by a touch sequence.
29 29
30 // TODO(rjkroege): A realistic version of the GestureManager will 30 // TODO(rjkroege): A realistic version of the GestureManager will
31 // appear in a subsequent CL. This interim version permits verifying that the 31 // appear in a subsequent CL. This interim version permits verifying that the
32 // event distribution code works by turning all touch inputs into 32 // event distribution code works by turning all touch inputs into
33 // mouse approximations. 33 // mouse approximations.
34 34
35 // Conver the touch-event into a mouse-event. This mouse-event gets its
36 // location information from the native-event, so it needs to drop on the
37 // toplevel widget instead of just source->GetWidget.
35 Event::FromNativeEvent2 from_native; 38 Event::FromNativeEvent2 from_native;
36 MouseEvent mouseev(event, from_native); 39 MouseEvent mouseev(event, from_native);
37 source->GetWidget()->OnMouseEvent(mouseev); 40 source->GetWidget()->GetTopLevelWidget()->OnMouseEvent(mouseev);
38 return true; 41 return true;
39 } 42 }
40 43
41 GestureManager::GestureManager() { 44 GestureManager::GestureManager() {
42 } 45 }
43 46
44 } // namespace views 47 } // namespace views
OLDNEW
« no previous file with comments | « views/events/event.h ('k') | views/widget/native_widget_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698