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

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

Issue 10823295: aura: Dispatch touch-events targetted to the root-window properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | ui/aura/root_window_unittest.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) 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 gesture_recognizer_->GetTouchLockedTarget(event)); 868 gesture_recognizer_->GetTouchLockedTarget(event));
869 if (!target) { 869 if (!target) {
870 target = ConsumerToWindow( 870 target = ConsumerToWindow(
871 gesture_recognizer_->GetTargetForLocation(event->location())); 871 gesture_recognizer_->GetTargetForLocation(event->location()));
872 } 872 }
873 } 873 }
874 874
875 if (!target && !bounds().Contains(event->location())) { 875 if (!target && !bounds().Contains(event->location())) {
876 // If the initial touch is outside the root window, target the root. 876 // If the initial touch is outside the root window, target the root.
877 target = this; 877 target = this;
878 status = ProcessTouchEvent(target, event);
879 CHECK_EQ(ui::TOUCH_STATUS_UNKNOWN, status);
878 } else { 880 } else {
879 // We only come here when the first contact was within the root window. 881 // We only come here when the first contact was within the root window.
880 if (!target) { 882 if (!target) {
881 target = GetEventHandlerForPoint(event->location()); 883 target = GetEventHandlerForPoint(event->location());
882 if (!target) 884 if (!target)
883 return false; 885 return false;
884 } 886 }
885 887
886 ui::TouchEvent translated_event( 888 ui::TouchEvent translated_event(
887 *event, static_cast<Window*>(this), target); 889 *event, static_cast<Window*>(this), target);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 void RootWindow::UnlockCompositor() { 1037 void RootWindow::UnlockCompositor() {
1036 DCHECK(compositor_lock_); 1038 DCHECK(compositor_lock_);
1037 compositor_lock_ = NULL; 1039 compositor_lock_ = NULL;
1038 if (draw_on_compositor_unlock_) { 1040 if (draw_on_compositor_unlock_) {
1039 draw_on_compositor_unlock_ = false; 1041 draw_on_compositor_unlock_ = false;
1040 ScheduleDraw(); 1042 ScheduleDraw();
1041 } 1043 }
1042 } 1044 }
1043 1045
1044 } // namespace aura 1046 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698