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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 12087140: Suppress touchscreen tap immediately after a GestureFlingCancel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated after TSC refactoring Created 7 years, 9 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 "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 if (ignore_input_events_ || process_->IgnoreInputEvents()) 905 if (ignore_input_events_ || process_->IgnoreInputEvents())
906 return; 906 return;
907 907
908 if (CommandLine::ForCurrentProcess()->HasSwitch( 908 if (CommandLine::ForCurrentProcess()->HasSwitch(
909 switches::kSimulateTouchScreenWithMouse)) { 909 switches::kSimulateTouchScreenWithMouse)) {
910 SimulateTouchGestureWithMouse(mouse_event); 910 SimulateTouchGestureWithMouse(mouse_event);
911 return; 911 return;
912 } 912 }
913 913
914 if (mouse_event.type == WebInputEvent::MouseDown && 914 if (mouse_event.type == WebInputEvent::MouseDown &&
915 gesture_event_filter_->GetTapSuppressionController()-> 915 gesture_event_filter_->GetTouchpadTapSuppressionController()->
916 ShouldDeferMouseDown(mouse_event)) 916 ShouldDeferMouseDown(mouse_event))
917 return; 917 return;
918 if (mouse_event.type == WebInputEvent::MouseUp && 918 if (mouse_event.type == WebInputEvent::MouseUp &&
919 gesture_event_filter_->GetTapSuppressionController()-> 919 gesture_event_filter_->GetTouchpadTapSuppressionController()->
920 ShouldSuppressMouseUp()) 920 ShouldSuppressMouseUp())
921 return; 921 return;
922 922
923 ForwardMouseEventImmediately(mouse_event); 923 ForwardMouseEventImmediately(mouse_event);
924 } 924 }
925 925
926 void RenderWidgetHostImpl::OnPointerEventActivate() { 926 void RenderWidgetHostImpl::OnPointerEventActivate() {
927 } 927 }
928 928
929 void RenderWidgetHostImpl::ForwardWheelEvent( 929 void RenderWidgetHostImpl::ForwardWheelEvent(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 return; 987 return;
988 988
989 if (!IsInOverscrollGesture() && 989 if (!IsInOverscrollGesture() &&
990 !gesture_event_filter_->ShouldForward(gesture_event)) 990 !gesture_event_filter_->ShouldForward(gesture_event))
991 return; 991 return;
992 992
993 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false); 993 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false);
994 } 994 }
995 995
996 // Forwards MouseEvent without passing it through 996 // Forwards MouseEvent without passing it through
997 // TouchpadTapSuppressionController 997 // TouchpadTapSuppressionController.
998 void RenderWidgetHostImpl::ForwardMouseEventImmediately( 998 void RenderWidgetHostImpl::ForwardMouseEventImmediately(
999 const WebMouseEvent& mouse_event) { 999 const WebMouseEvent& mouse_event) {
1000 TRACE_EVENT2("renderer_host", 1000 TRACE_EVENT2("renderer_host",
1001 "RenderWidgetHostImpl::ForwardMouseEventImmediately", 1001 "RenderWidgetHostImpl::ForwardMouseEventImmediately",
1002 "x", mouse_event.x, "y", mouse_event.y); 1002 "x", mouse_event.x, "y", mouse_event.y);
1003 if (ignore_input_events_ || process_->IgnoreInputEvents()) 1003 if (ignore_input_events_ || process_->IgnoreInputEvents())
1004 return; 1004 return;
1005 1005
1006 if (CommandLine::ForCurrentProcess()->HasSwitch( 1006 if (CommandLine::ForCurrentProcess()->HasSwitch(
1007 switches::kSimulateTouchScreenWithMouse)) { 1007 switches::kSimulateTouchScreenWithMouse)) {
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 return; 2392 return;
2393 2393
2394 OnRenderAutoResized(new_size); 2394 OnRenderAutoResized(new_size);
2395 } 2395 }
2396 2396
2397 void RenderWidgetHostImpl::DetachDelegate() { 2397 void RenderWidgetHostImpl::DetachDelegate() {
2398 delegate_ = NULL; 2398 delegate_ = NULL;
2399 } 2399 }
2400 2400
2401 } // namespace content 2401 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698