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

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

Issue 679633005: Expose native, desktop and mobile gesture detection defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/window_event_dispatcher.h" 5 #include "ui/aura/window_event_dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 return; 876 return;
877 } 877 }
878 break; 878 break;
879 879
880 default: 880 default:
881 NOTREACHED(); 881 NOTREACHED();
882 break; 882 break;
883 } 883 }
884 884
885 ui::TouchEvent orig_event(*event, target, window()); 885 ui::TouchEvent orig_event(*event, target, window());
886 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(orig_event, 886 if (!ui::GestureRecognizer::Get()->ProcessTouchEventPreDispatch(&orig_event,
887 target)) { 887 target)) {
888 // The event is invalid - ignore it. 888 // The event is invalid - ignore it.
889 event->StopPropagation(); 889 event->StopPropagation();
890 event->DisableSynchronousHandling(); 890 event->DisableSynchronousHandling();
891 return; 891 return;
892 } 892 }
893 893
894 // This flag is set depending on the gestures recognized in the call above,
895 // and needs to propagate with the forwarded event.
896 event->set_may_cause_scrolling(orig_event.may_cause_scrolling());
897
sadrul 2014/12/15 17:40:46 Can you add a test to make sure this bit is set co
jdduke (slow) 2014/12/15 18:37:37 Done.
894 PreDispatchLocatedEvent(target, event); 898 PreDispatchLocatedEvent(target, event);
895 } 899 }
896 900
897 } // namespace aura 901 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698