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

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

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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 71aa04fcf349b863b94ba6b5020a711d76ecc799..f13799c5d9eea53565e6062a67389bac89e8238d 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -356,8 +356,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Event queries delegated to the |input_router_|.
bool ShouldForwardTouchEvent() const;
- bool has_touch_handler() const { return has_touch_handler_; }
-
// Notification that the user has made some kind of input that could
// perform an action. See OnUserGesture for more details.
void StartUserGesture();
@@ -427,11 +425,17 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// suppress_next_char_events_.
void SuppressNextCharEvents();
- // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput.
+ // Clear any pending input events, preparing for a new input event stream.
+ // This method should be called any time an action (either in the browser
+ // or the renderer) renders potentially buffered events as invalid for the
+ // current target, e.g., main frame navigation.
+ void ResetPendingInput();
+
+ // Called by the view in response to flush requests.
void FlushInput();
- // InputRouterClient
- void SetNeedsFlush() override;
+ // Request an input flush from the view.
+ void SetNeedsFlushInput();
// Indicates whether the renderer drives the RenderWidgetHosts's size or the
// other way around.
@@ -585,6 +589,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// NotifyRendererResponsive.
void RendererIsResponsive();
+ // Recreate the input router, e.g., when the render process has crashed.
+ void ResetInputRouter();
+
// IPC message handlers
void OnRenderViewReady();
void OnRenderProcessGone(int status, int error_code);
@@ -647,7 +654,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
const ui::LatencyInfo& latency_info) override;
void IncrementInFlightEventCount() override;
void DecrementInFlightEventCount() override;
- void OnHasTouchEventHandlers(bool has_handlers) override;
void DidFlush() override;
void DidOverscroll(const DidOverscrollParams& params) override;
@@ -818,11 +824,6 @@ class CONTENT_EXPORT RenderWidgetHostImpl
bool pending_mouse_lock_request_;
bool allow_privileged_mouse_lock_;
- // Keeps track of whether the webpage has any touch event handler. If it does,
- // then touch events are sent to the renderer. Otherwise, the touch events are
- // not sent to the renderer.
- bool has_touch_handler_;
-
scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
scoped_ptr<TouchEmulator> touch_emulator_;
« no previous file with comments | « content/browser/renderer_host/input/touch_event_queue.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698