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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index b4aadc1821371c8c2cb537cb04af6c68f50f3049..cbcad5f33a58d2d2290231378630dfa4bab93390 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -51,6 +51,7 @@
// Note that headers in third_party/skia/src are fragile. This is
// an experimental, fragile, and diagnostic-only document type.
#include "third_party/skia/src/utils/SkMultiPictureDocument.h"
+#include "ui/events/base_event_utils.h"
#include "ui/gfx/codec/png_codec.h"
#include "v8/include/v8.h"
@@ -344,8 +345,9 @@ bool BeginSmoothScroll(v8::Isolate* isolate,
context.web_view()->setIsActive(true);
blink::WebRect contentRect =
context.web_view()->mainFrame()->visibleContentRect();
- blink::WebMouseEvent mouseMove;
- mouseMove.type = blink::WebInputEvent::MouseMove;
+ blink::WebMouseEvent mouseMove(
+ blink::WebInputEvent::MouseMove, blink::WebInputEvent::NoModifiers,
+ ui::EventTimeStampToSeconds(ui::EventTimeForNow()));
mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor;
mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor;
context.web_view()->handleInputEvent(mouseMove);

Powered by Google App Engine
This is Rietveld 408576698