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

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: Allowed GFC Ack in NOTHING state + Resolved a link error on win 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 if (ignore_input_events_ || process_->IgnoreInputEvents()) 911 if (ignore_input_events_ || process_->IgnoreInputEvents())
912 return; 912 return;
913 913
914 if (CommandLine::ForCurrentProcess()->HasSwitch( 914 if (CommandLine::ForCurrentProcess()->HasSwitch(
915 switches::kSimulateTouchScreenWithMouse)) { 915 switches::kSimulateTouchScreenWithMouse)) {
916 SimulateTouchGestureWithMouse(mouse_event); 916 SimulateTouchGestureWithMouse(mouse_event);
917 return; 917 return;
918 } 918 }
919 919
920 if (mouse_event.type == WebInputEvent::MouseDown && 920 if (mouse_event.type == WebInputEvent::MouseDown &&
921 gesture_event_filter_->GetTapSuppressionController()-> 921 gesture_event_filter_->GetTouchpadTapSuppressionController()->
922 ShouldDeferMouseDown(mouse_event)) 922 ShouldDeferMouseDown(mouse_event))
923 return; 923 return;
924 if (mouse_event.type == WebInputEvent::MouseUp && 924 if (mouse_event.type == WebInputEvent::MouseUp &&
925 gesture_event_filter_->GetTapSuppressionController()-> 925 gesture_event_filter_->GetTouchpadTapSuppressionController()->
926 ShouldSuppressMouseUp()) 926 ShouldSuppressMouseUp())
927 return; 927 return;
928 928
929 ForwardMouseEventImmediately(mouse_event); 929 ForwardMouseEventImmediately(mouse_event);
930 } 930 }
931 931
932 void RenderWidgetHostImpl::OnPointerEventActivate() { 932 void RenderWidgetHostImpl::OnPointerEventActivate() {
933 } 933 }
934 934
935 void RenderWidgetHostImpl::ForwardWheelEvent( 935 void RenderWidgetHostImpl::ForwardWheelEvent(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
993 return; 993 return;
994 994
995 if (!IsInOverscrollGesture() && 995 if (!IsInOverscrollGesture() &&
996 !gesture_event_filter_->ShouldForward(gesture_event)) 996 !gesture_event_filter_->ShouldForward(gesture_event))
997 return; 997 return;
998 998
999 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false); 999 ForwardInputEvent(gesture_event, sizeof(WebGestureEvent), false);
1000 } 1000 }
1001 1001
1002 // Forwards MouseEvent without passing it through 1002 // Forwards MouseEvent without passing it through
1003 // TouchpadTapSuppressionController 1003 // TouchpadTapSuppressionController.
1004 void RenderWidgetHostImpl::ForwardMouseEventImmediately( 1004 void RenderWidgetHostImpl::ForwardMouseEventImmediately(
1005 const WebMouseEvent& mouse_event) { 1005 const WebMouseEvent& mouse_event) {
1006 TRACE_EVENT2("renderer_host", 1006 TRACE_EVENT2("renderer_host",
1007 "RenderWidgetHostImpl::ForwardMouseEventImmediately", 1007 "RenderWidgetHostImpl::ForwardMouseEventImmediately",
1008 "x", mouse_event.x, "y", mouse_event.y); 1008 "x", mouse_event.x, "y", mouse_event.y);
1009 if (ignore_input_events_ || process_->IgnoreInputEvents()) 1009 if (ignore_input_events_ || process_->IgnoreInputEvents())
1010 return; 1010 return;
1011 1011
1012 if (CommandLine::ForCurrentProcess()->HasSwitch( 1012 if (CommandLine::ForCurrentProcess()->HasSwitch(
1013 switches::kSimulateTouchScreenWithMouse)) { 1013 switches::kSimulateTouchScreenWithMouse)) {
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2410 return; 2410 return;
2411 2411
2412 OnRenderAutoResized(new_size); 2412 OnRenderAutoResized(new_size);
2413 } 2413 }
2414 2414
2415 void RenderWidgetHostImpl::DetachDelegate() { 2415 void RenderWidgetHostImpl::DetachDelegate() {
2416 delegate_ = NULL; 2416 delegate_ = NULL;
2417 } 2417 }
2418 2418
2419 } // namespace content 2419 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698