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

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

Issue 10825323: gesture: Make sure a combination of sync/async touch-events work correctly. (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
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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 if (!target) 882 if (!target)
883 return false; 883 return false;
884 } 884 }
885 885
886 ui::TouchEvent translated_event( 886 ui::TouchEvent translated_event(
887 *event, static_cast<Window*>(this), target); 887 *event, static_cast<Window*>(this), target);
888 status = ProcessTouchEvent(target, &translated_event); 888 status = ProcessTouchEvent(target, &translated_event);
889 handled = status != ui::TOUCH_STATUS_UNKNOWN; 889 handled = status != ui::TOUCH_STATUS_UNKNOWN;
890 890
891 if (status == ui::TOUCH_STATUS_QUEUED || 891 if (status == ui::TOUCH_STATUS_QUEUED ||
892 status == ui::TOUCH_STATUS_QUEUED_END) 892 status == ui::TOUCH_STATUS_QUEUED_END) {
893 gesture_recognizer_->QueueTouchEventForGesture(target, *event); 893 gesture_recognizer_->QueueTouchEventForGesture(target, *event);
894 return true;
895 }
894 } 896 }
895 897
896 // Get the list of GestureEvents from GestureRecognizer. 898 // Get the list of GestureEvents from GestureRecognizer.
897 scoped_ptr<ui::GestureRecognizer::Gestures> gestures; 899 scoped_ptr<ui::GestureRecognizer::Gestures> gestures;
898 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture( 900 gestures.reset(gesture_recognizer_->ProcessTouchEventForGesture(
899 *event, status, target)); 901 *event, status, target));
900 902
901 return ProcessGestures(gestures.get()) ? true : handled; 903 return ProcessGestures(gestures.get()) ? true : handled;
902 } 904 }
903 905
(...skipping 131 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

Powered by Google App Engine
This is Rietveld 408576698