summaryrefslogtreecommitdiffstats
path: root/views/touchui
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 00:11:40 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 00:11:40 +0000
commitb4d13c652373433d8f6b755bc68f670f187d2157 (patch)
treeb9a64ed14157f4fb6e03d040921bc9ba63f54091 /views/touchui
parent90d890d27ead80ecbbe5e861ec71ff97b459c954 (diff)
downloadchromium_src-b4d13c652373433d8f6b755bc68f670f187d2157.zip
chromium_src-b4d13c652373433d8f6b755bc68f670f187d2157.tar.gz
chromium_src-b4d13c652373433d8f6b755bc68f670f187d2157.tar.bz2
Convert LOG(INFO) to VLOG(1) - views/.
This also removes DEBUG_MENU. I don't think the extra ints are a big deal. They should be optimized away in release mode. Also fixes a spelling error and converts some silly code to using early returns. BUG=none TEST=none Review URL: http://codereview.chromium.org/3908004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/touchui')
-rw-r--r--views/touchui/gesture_manager.cc33
1 files changed, 16 insertions, 17 deletions
diff --git a/views/touchui/gesture_manager.cc b/views/touchui/gesture_manager.cc
index 7123519..b88aa56 100644
--- a/views/touchui/gesture_manager.cc
+++ b/views/touchui/gesture_manager.cc
@@ -25,35 +25,34 @@ bool GestureManager::ProcessTouchEventForGesture(const TouchEvent& event,
bool previouslyHandled) {
// TODO(rjkroege): A realistic version of the GestureManager will
// appear in a subsequent CL. This interim version permits verifying that the
- // event distirbution code works by turning all touch inputs into
+ // event distribution code works by turning all touch inputs into
// mouse approximations.
- bool handled = false;
if (event.GetType() == Event::ET_TOUCH_PRESSED) {
- DLOG(INFO) << "GestureManager::ProcessTouchEventForGesture: " <<
- "TouchPressed\n";
+ DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchPressed";
MouseEvent mouse_event(Event::ET_MOUSE_PRESSED, event.x(), event.y(),
event.GetFlags());
source->OnMousePressed(mouse_event);
- handled = true;
- } else if (event.GetType() == Event::ET_TOUCH_RELEASED) {
- DLOG(INFO) << "GestureManager::ProcessTouchEventForGesture: " <<
- "TouchReleased\n";
+ return true;
+ }
+
+ if (event.GetType() == Event::ET_TOUCH_RELEASED) {
+ DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchReleased";
MouseEvent mouse_event(Event::ET_MOUSE_RELEASED, event.x(), event.y(),
event.GetFlags());
source->OnMouseReleased(mouse_event, false);
- handled = true;
- } else if (event.GetType() == Event::ET_TOUCH_MOVED) {
- DLOG(INFO) << "GestureManager::ProcessTouchEventForGesture: " <<
- "TouchMotion\n";
+ return true;
+ }
+
+ if (event.GetType() == Event::ET_TOUCH_MOVED) {
+ DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: TouchMotion";
MouseEvent mouse_event(Event::ET_MOUSE_DRAGGED, event.x(), event.y(),
event.GetFlags());
source->OnMouseDragged(mouse_event);
- handled = true;
- } else {
- DLOG(INFO) << "GestureManager::ProcessTouchEventForGesture: " <<
- "unhandled event\n";
+ return true;
}
- return handled;
+
+ DVLOG(1) << "GestureManager::ProcessTouchEventForGesture: unhandled event";
+ return false;
}
GestureManager::GestureManager() {