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

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

Issue 1407053010: Make mouse wheel events trigger WebContentsObserver::DidGetUserInteraction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits Created 5 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 ccfeeb98794ad261064dd648c3f6c20d6983c276..7368e6821b01ec02fa2d9baef27d2027a42f1b28 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -18,7 +18,7 @@
#include "base/process/kill.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
-#include "base/timer/timer.h"
+#include "base/timer/elapsed_timer.h"
#include "build/build_config.h"
#include "cc/resources/shared_bitmap.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
@@ -853,6 +853,11 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
// renderer process before clearing any previously displayed content.
base::TimeDelta new_content_rendering_delay_;
+ // Timer used to batch together mouse wheel events for the delegate
+ // OnUserInteraction method. A wheel event is only dispatched when a wheel
+ // event has not been seen for g_wheel_coalesce_interval seconds prior.
+ scoped_ptr<base::ElapsedTimer> wheel_coalesce_timer_;
nasko 2015/11/03 20:45:59 nit: Add a "mouse_" prefix.
dominickn 2015/11/03 21:29:42 Done.
+
base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);

Powered by Google App Engine
This is Rietveld 408576698