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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 1993383002: Adding Event.Latency.Browser.WheelUI, Passing latency_info to ProcessMouse/MouseWheelEvent functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/cross_process_frame_connector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 // Mark the resend source with the browser plugin's instance id, so the 452 // Mark the resend source with the browser plugin's instance id, so the
453 // correct browser_plugin will know to ignore the event. 453 // correct browser_plugin will know to ignore the event.
454 resent_gesture_event.resendingPluginId = browser_plugin_instance_id_; 454 resent_gesture_event.resendingPluginId = browser_plugin_instance_id_;
455 view->ProcessGestureEvent(resent_gesture_event, ui::LatencyInfo()); 455 view->ProcessGestureEvent(resent_gesture_event, ui::LatencyInfo());
456 } else if (event.type == blink::WebInputEvent::MouseWheel) { 456 } else if (event.type == blink::WebInputEvent::MouseWheel) {
457 blink::WebMouseWheelEvent resent_wheel_event; 457 blink::WebMouseWheelEvent resent_wheel_event;
458 memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent)); 458 memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent));
459 resent_wheel_event.x += offset_from_embedder.x(); 459 resent_wheel_event.x += offset_from_embedder.x();
460 resent_wheel_event.y += offset_from_embedder.y(); 460 resent_wheel_event.y += offset_from_embedder.y();
461 resent_wheel_event.resendingPluginId = browser_plugin_instance_id_; 461 resent_wheel_event.resendingPluginId = browser_plugin_instance_id_;
462 view->ProcessMouseWheelEvent(resent_wheel_event); 462 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs.
463 // https://crbug.com/613628
464 ui::LatencyInfo latency_info;
465 view->ProcessMouseWheelEvent(resent_wheel_event, latency_info);
463 } else { 466 } else {
464 NOTIMPLEMENTED(); 467 NOTIMPLEMENTED();
465 } 468 }
466 } 469 }
467 470
468 WebContentsImpl* BrowserPluginGuest::GetWebContents() const { 471 WebContentsImpl* BrowserPluginGuest::GetWebContents() const {
469 return static_cast<WebContentsImpl*>(web_contents()); 472 return static_cast<WebContentsImpl*>(web_contents());
470 } 473 }
471 474
472 gfx::Point BrowserPluginGuest::GetScreenCoordinates( 475 gfx::Point BrowserPluginGuest::GetScreenCoordinates(
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 range, character_bounds); 1010 range, character_bounds);
1008 } 1011 }
1009 #endif 1012 #endif
1010 1013
1011 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1014 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1012 if (delegate_) 1015 if (delegate_)
1013 delegate_->SetContextMenuPosition(position); 1016 delegate_->SetContextMenuPosition(position);
1014 } 1017 }
1015 1018
1016 } // namespace content 1019 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/cross_process_frame_connector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698