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

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

Issue 2882443002: Tiimer based phase info generated for mouse wheel events. (Closed)
Patch Set: debouncing queue disabled to count sent messages properly Created 3 years, 7 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_view_event_handler.h
diff --git a/content/browser/renderer_host/render_widget_host_view_event_handler.h b/content/browser/renderer_host/render_widget_host_view_event_handler.h
index 8f80ee7f4e049067980dec57a587c14da01b21df..4b3378a99f6bc291e505aa7b3f00e339af7471e0 100644
--- a/content/browser/renderer_host/render_widget_host_view_event_handler.h
+++ b/content/browser/renderer_host/render_widget_host_view_event_handler.h
@@ -8,6 +8,8 @@
#include <memory>
#include "base/macros.h"
+#include "base/time/time.h"
+#include "base/timer/timer.h"
tdresser 2017/05/18 13:49:06 Are both of these being used?
sahel 2017/05/18 18:15:15 Done.
#include "content/common/content_export.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "ui/aura/window_tracker.h"
@@ -31,6 +33,11 @@ class TouchSelectionController;
}
namespace content {
+
+// The duration in which a synthetic wheel with zero deltas and
tdresser 2017/05/18 13:49:06 in which -> after which
sahel 2017/05/18 18:15:15 Done.
+// phase = |kPhaseEnded| will be sent after the last wheel event.
+const int64_t kDefaultMouseWheelLatchingTransactionMs = 100;
+
struct ContextMenuParams;
class OverscrollController;
class RenderWidgetHostImpl;
@@ -185,6 +192,11 @@ class CONTENT_EXPORT RenderWidgetHostViewEventHandler
const ui::LatencyInfo& latency);
void ProcessTouchEvent(const blink::WebTouchEvent& event,
const ui::LatencyInfo& latency);
+ void SendSyntheticWheelEventWithPhaseEnded(
+ blink::WebMouseWheelEvent last_mouse_wheel_event,
+ bool should_route_event);
+ void AddSyntheticPhase(blink::WebMouseWheelEvent& mouse_wheel_event,
+ bool should_route_event);
// Whether return characters should be passed on to the RenderWidgetHostImpl.
bool accept_return_character_;
@@ -247,6 +259,8 @@ class CONTENT_EXPORT RenderWidgetHostViewEventHandler
Delegate* const delegate_;
aura::Window* window_;
+ base::OneShotTimer mouse_wheel_phase_timer_;
tdresser 2017/05/18 13:49:06 Maybe |dispatch_synthetic_mouse_wheel_end_timer_|?
bokan 2017/05/18 16:47:01 I like mouse_wheel_end_dispatch_timer_.
sahel 2017/05/18 18:15:15 Done.
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewEventHandler);
};

Powered by Google App Engine
This is Rietveld 408576698