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

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

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 years, 9 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/focus/accelerator_handler_touch.cc ('k') | views/view.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) 2010 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"
11 #include "views/events/event.h" 11 #include "views/events/event.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 MouseEvent mouse_event(ui::ET_MOUSE_PRESSED, location.x(), location.y(), 45 MouseEvent mouse_event(ui::ET_MOUSE_PRESSED, location.x(), location.y(),
46 event.flags()); 46 event.flags());
47 source->OnMousePressed(mouse_event); 47 source->OnMousePressed(mouse_event);
48 return true; 48 return true;
49 } 49 }
50 50
51 if (event.type() == ui::ET_TOUCH_RELEASED) { 51 if (event.type() == ui::ET_TOUCH_RELEASED) {
52 DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchReleased"; 52 DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchReleased";
53 MouseEvent mouse_event(ui::ET_MOUSE_RELEASED, location.x(), location.y(), 53 MouseEvent mouse_event(ui::ET_MOUSE_RELEASED, location.x(), location.y(),
54 event.flags()); 54 event.flags());
55 source->OnMouseReleased(mouse_event, false); 55 source->OnMouseReleased(mouse_event);
56 return true; 56 return true;
57 } 57 }
58 58
59 if (event.type() == ui::ET_TOUCH_MOVED) { 59 if (event.type() == ui::ET_TOUCH_MOVED) {
60 DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchMotion"; 60 DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchMotion";
61 MouseEvent mouse_event(ui::ET_MOUSE_DRAGGED, location.x(), location.y(), 61 MouseEvent mouse_event(ui::ET_MOUSE_DRAGGED, location.x(), location.y(),
62 event.flags()); 62 event.flags());
63 source->OnMouseDragged(mouse_event); 63 source->OnMouseDragged(mouse_event);
64 return true; 64 return true;
65 } 65 }
66 66
67 DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: unhandled event"; 67 DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: unhandled event";
68 return false; 68 return false;
69 } 69 }
70 70
71 GestureManager::GestureManager() { 71 GestureManager::GestureManager() {
72 } 72 }
73 73
74 } // namespace views 74 } // namespace views
OLDNEW
« no previous file with comments | « views/focus/accelerator_handler_touch.cc ('k') | views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698