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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1735833002: Remove WebContentsObserver::DidGetUserGesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing reviewer comment Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index baf1cc4c75a4ec24ab4afaa3c1617df86882f133..996e2e7409decc16f4467a957dc267d63643e304 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1133,13 +1133,6 @@ void RenderWidgetHostImpl::ForwardKeyboardEvent(
return;
}
- if (key_event.type == WebKeyboardEvent::Char &&
- (key_event.windowsKeyCode == ui::VKEY_RETURN ||
- key_event.windowsKeyCode == ui::VKEY_SPACE)) {
- if (delegate_)
- delegate_->OnUserGesture(this);
- }
-
// Double check the type to make sure caller hasn't sent us nonsense that
// will mess up our key queue.
if (!WebInputEvent::isKeyboardEventType(key_event.type))
@@ -1907,21 +1900,17 @@ InputEventAckState RenderWidgetHostImpl::FilterInputEvent(
if (!process_->HasConnection())
return INPUT_EVENT_ACK_STATE_UNKNOWN;
- if (event.type == WebInputEvent::MouseDown ||
- event.type == WebInputEvent::GestureTapDown) {
- if (delegate_)
- delegate_->OnUserGesture(this);
- }
-
if (delegate_) {
if (event.type == WebInputEvent::MouseDown ||
event.type == WebInputEvent::GestureTapDown ||
event.type == WebInputEvent::RawKeyDown) {
- delegate_->OnUserInteraction(event.type);
+ delegate_->OnUserInteraction(this, event.type);
} else if (event.type == WebInputEvent::MouseWheel) {
if (mouse_wheel_coalesce_timer_->Elapsed().InSecondsF() >
kMouseWheelCoalesceIntervalInSeconds) {
- delegate_->OnUserInteraction(event.type);
+ // TODO(dominickn): once GestureScrollBegin has landed on all platforms,
+ // replace this branch and remove.
+ delegate_->OnUserInteraction(this, event.type);
}
mouse_wheel_coalesce_timer_.reset(new base::ElapsedTimer());
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698