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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 // Mark the resend source with the browser plugin's instance id, so the | 461 // Mark the resend source with the browser plugin's instance id, so the |
462 // correct browser_plugin will know to ignore the event. | 462 // correct browser_plugin will know to ignore the event. |
463 resent_gesture_event.resendingPluginId = browser_plugin_instance_id_; | 463 resent_gesture_event.resendingPluginId = browser_plugin_instance_id_; |
464 ui::LatencyInfo latency_info = | 464 ui::LatencyInfo latency_info = |
465 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent( | 465 ui::WebInputEventTraits::CreateLatencyInfoForWebGestureEvent( |
466 resent_gesture_event); | 466 resent_gesture_event); |
467 view->ProcessGestureEvent(resent_gesture_event, latency_info); | 467 view->ProcessGestureEvent(resent_gesture_event, latency_info); |
468 } else if (event.type() == blink::WebInputEvent::MouseWheel) { | 468 } else if (event.type() == blink::WebInputEvent::MouseWheel) { |
469 blink::WebMouseWheelEvent resent_wheel_event; | 469 blink::WebMouseWheelEvent resent_wheel_event; |
470 memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent)); | 470 memcpy(&resent_wheel_event, &event, sizeof(blink::WebMouseWheelEvent)); |
471 resent_wheel_event.x += offset_from_embedder.x(); | 471 resent_wheel_event.setPositionInWidget( |
472 resent_wheel_event.y += offset_from_embedder.y(); | 472 resent_wheel_event.positionInWidget().x + offset_from_embedder.x(), |
| 473 resent_wheel_event.positionInWidget().y + offset_from_embedder.y()); |
473 resent_wheel_event.resendingPluginId = browser_plugin_instance_id_; | 474 resent_wheel_event.resendingPluginId = browser_plugin_instance_id_; |
474 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs. | 475 // TODO(wjmaclean): Initialize latency info correctly for OOPIFs. |
475 // https://crbug.com/613628 | 476 // https://crbug.com/613628 |
476 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); | 477 ui::LatencyInfo latency_info(ui::SourceEventType::WHEEL); |
477 view->ProcessMouseWheelEvent(resent_wheel_event, latency_info); | 478 view->ProcessMouseWheelEvent(resent_wheel_event, latency_info); |
478 } else { | 479 } else { |
479 NOTIMPLEMENTED(); | 480 NOTIMPLEMENTED(); |
480 } | 481 } |
481 } | 482 } |
482 | 483 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 range, character_bounds); | 1062 range, character_bounds); |
1062 } | 1063 } |
1063 #endif | 1064 #endif |
1064 | 1065 |
1065 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { | 1066 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { |
1066 if (delegate_) | 1067 if (delegate_) |
1067 delegate_->SetContextMenuPosition(position); | 1068 delegate_->SetContextMenuPosition(position); |
1068 } | 1069 } |
1069 | 1070 |
1070 } // namespace content | 1071 } // namespace content |
OLD | NEW |