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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_target_base.cc

Issue 660663002: Clear pending events upon main frame navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/input/synthetic_gesture_target_base.h" 5 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
6 6
7 #include "content/browser/renderer_host/render_widget_host_impl.h" 7 #include "content/browser/renderer_host/render_widget_host_impl.h"
8 #include "content/browser/renderer_host/render_widget_host_view_base.h" 8 #include "content/browser/renderer_host/render_widget_host_view_base.h"
9 #include "content/browser/renderer_host/ui_events_helper.h" 9 #include "content/browser/renderer_host/ui_events_helper.h"
10 #include "content/common/input_messages.h" 10 #include "content/common/input_messages.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 host_->ForwardWheelEventWithLatencyInfo(web_wheel, latency_info); 97 host_->ForwardWheelEventWithLatencyInfo(web_wheel, latency_info);
98 } 98 }
99 99
100 void SyntheticGestureTargetBase::DispatchWebMouseEventToPlatform( 100 void SyntheticGestureTargetBase::DispatchWebMouseEventToPlatform(
101 const blink::WebMouseEvent& web_mouse, 101 const blink::WebMouseEvent& web_mouse,
102 const ui::LatencyInfo& latency_info) { 102 const ui::LatencyInfo& latency_info) {
103 host_->ForwardMouseEventWithLatencyInfo(web_mouse, latency_info); 103 host_->ForwardMouseEventWithLatencyInfo(web_mouse, latency_info);
104 } 104 }
105 105
106 void SyntheticGestureTargetBase::SetNeedsFlush() { 106 void SyntheticGestureTargetBase::SetNeedsFlush() {
107 host_->SetNeedsFlush(); 107 host_->SetNeedsFlushInput();
108 } 108 }
109 109
110 SyntheticGestureParams::GestureSourceType 110 SyntheticGestureParams::GestureSourceType
111 SyntheticGestureTargetBase::GetDefaultSyntheticGestureSourceType() const { 111 SyntheticGestureTargetBase::GetDefaultSyntheticGestureSourceType() const {
112 return SyntheticGestureParams::MOUSE_INPUT; 112 return SyntheticGestureParams::MOUSE_INPUT;
113 } 113 }
114 114
115 base::TimeDelta SyntheticGestureTargetBase::PointerAssumedStoppedTime() 115 base::TimeDelta SyntheticGestureTargetBase::PointerAssumedStoppedTime()
116 const { 116 const {
117 return base::TimeDelta::FromMilliseconds(kPointerAssumedStoppedTimeMs); 117 return base::TimeDelta::FromMilliseconds(kPointerAssumedStoppedTimeMs);
(...skipping 10 matching lines...) Expand all
128 return 0.0f; 128 return 0.0f;
129 } 129 }
130 130
131 bool SyntheticGestureTargetBase::PointIsWithinContents(int x, int y) const { 131 bool SyntheticGestureTargetBase::PointIsWithinContents(int x, int y) const {
132 gfx::Rect bounds = host_->GetView()->GetViewBounds(); 132 gfx::Rect bounds = host_->GetView()->GetViewBounds();
133 bounds -= bounds.OffsetFromOrigin(); // Translate the bounds to (0,0). 133 bounds -= bounds.OffsetFromOrigin(); // Translate the bounds to (0,0).
134 return bounds.Contains(x, y); 134 return bounds.Contains(x, y);
135 } 135 }
136 136
137 } // namespace content 137 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698