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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2317253005: SourceEventType added to LatencyInfo (Closed)
Patch Set: Changed the patch to only contain source event type plumbing. Created 4 years, 3 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/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index d0a39e22c2d7afa3dcd1fddb5d72c12c4b03d299..b560aa092bf8dc5b18b39e0d99e4108ceb8c8d8d 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -48,6 +48,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/browser_plugin_guest_mode.h"
#include "content/public/common/drop_data.h"
+#include "ui/events/blink/web_input_event_traits.h"
#include "ui/gfx/geometry/size_conversions.h"
#if defined(OS_MACOSX)
@@ -454,7 +455,10 @@ void BrowserPluginGuest::ResendEventToEmbedder(
// Mark the resend source with the browser plugin's instance id, so the
// correct browser_plugin will know to ignore the event.
resent_gesture_event.resendingPluginId = browser_plugin_instance_id_;
- view->ProcessGestureEvent(resent_gesture_event, ui::LatencyInfo());
+ ui::LatencyInfo latency_info =
+ ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(
+ resent_gesture_event);
+ view->ProcessGestureEvent(resent_gesture_event, latency_info);
} else if (event.type == blink::WebInputEvent::MouseWheel) {
blink::WebMouseWheelEvent resent_wheel_event;
memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent));
@@ -463,7 +467,7 @@ void BrowserPluginGuest::ResendEventToEmbedder(
resent_wheel_event.resendingPluginId = browser_plugin_instance_id_;
// TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
// https://crbug.com/613628
tdresser 2016/09/12 14:23:08 Remove TODO, update linked bug, cc James. Does th
tdresser 2016/09/12 15:36:37 Whoops, you're right, this isn't done. We should
sahel 2016/09/12 17:02:26 Acknowledged.
- ui::LatencyInfo latency_info;
+ ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL);
view->ProcessMouseWheelEvent(resent_wheel_event, latency_info);
} else {
NOTIMPLEMENTED();

Powered by Google App Engine
This is Rietveld 408576698