| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |