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

Side by Side Diff: ui/aura/root_window.cc

Issue 10306014: Calibrating touch input (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing comments Created 8 years, 7 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
« no previous file with comments | « no previous file | ui/base/ui_base_switches.h » ('j') | ui/base/ui_base_switches.h » ('J')
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/aura/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 303
304 if (!target) { 304 if (!target) {
305 target = static_cast<Window*>( 305 target = static_cast<Window*>(
306 gesture_recognizer_->GetTargetForLocation(event->GetLocation())); 306 gesture_recognizer_->GetTargetForLocation(event->GetLocation()));
307 } 307 }
308 308
309 if (!target && !bounds().Contains(event->location())) { 309 if (!target && !bounds().Contains(event->location())) {
310 // If the touch is outside the root window, set its target to the 310 // If the touch is outside the root window, set its target to the
311 // root window. 311 // root window.
312 target = this; 312 target = this;
313 } else { 313 } else if (target != this) {
sky 2012/05/04 16:31:41 Can you add a test case for this?
Mr4D (OOO till 08-26) 2012/05/07 16:28:21 After discussion with Sadrul I changed this to the
314 // We only come here when the first contact was within the root window.
314 if (!target) 315 if (!target)
315 target = GetEventHandlerForPoint(event->location()); 316 target = GetEventHandlerForPoint(event->location());
316 if (!target) 317 if (!target)
317 return false; 318 return false;
318 319
319 TouchEvent translated_event(*event, this, target); 320 TouchEvent translated_event(*event, this, target);
320 status = ProcessTouchEvent(target, &translated_event); 321 status = ProcessTouchEvent(target, &translated_event);
321 handled = status != ui::TOUCH_STATUS_UNKNOWN; 322 handled = status != ui::TOUCH_STATUS_UNKNOWN;
322 323
323 if (status == ui::TOUCH_STATUS_QUEUED || 324 if (status == ui::TOUCH_STATUS_QUEUED ||
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 void RootWindow::UnlockCompositor() { 987 void RootWindow::UnlockCompositor() {
987 DCHECK(compositor_lock_); 988 DCHECK(compositor_lock_);
988 compositor_lock_ = NULL; 989 compositor_lock_ = NULL;
989 if (draw_on_compositor_unlock_) { 990 if (draw_on_compositor_unlock_) {
990 draw_on_compositor_unlock_ = false; 991 draw_on_compositor_unlock_ = false;
991 ScheduleDraw(); 992 ScheduleDraw();
992 } 993 }
993 } 994 }
994 995
995 } // namespace aura 996 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/base/ui_base_switches.h » ('j') | ui/base/ui_base_switches.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698