| 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 09db70faf74347248dd225ba085087cfe24862c3..b548139fc39466d981c9e95099e7cba50e7d796b 100644
|
| --- a/content/browser/browser_plugin/browser_plugin_guest.cc
|
| +++ b/content/browser/browser_plugin/browser_plugin_guest.cc
|
| @@ -128,6 +128,11 @@ WebContentsImpl* BrowserPluginGuest::CreateNewGuestWindow(
|
|
|
| bool BrowserPluginGuest::OnMessageReceivedFromEmbedder(
|
| const IPC::Message& message) {
|
| + RenderWidgetHostViewGuest* rwhv = static_cast<RenderWidgetHostViewGuest*>(
|
| + web_contents()->GetRenderWidgetHostView());
|
| + if (rwhv && rwhv->OnMessageReceivedFromEmbedder(message))
|
| + return true;
|
| +
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(BrowserPluginGuest, message)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_CompositorFrameSwappedACK,
|
| @@ -140,8 +145,6 @@ bool BrowserPluginGuest::OnMessageReceivedFromEmbedder(
|
| OnExecuteEditCommand)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ExtendSelectionAndDelete,
|
| OnExtendSelectionAndDelete)
|
| - IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_HandleInputEvent,
|
| - OnHandleInputEvent)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeConfirmComposition,
|
| OnImeConfirmComposition)
|
| IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_ImeSetComposition,
|
| @@ -359,9 +362,9 @@ gfx::Point BrowserPluginGuest::GetScreenCoordinates(
|
|
|
| gfx::Point screen_pos(relative_position);
|
| screen_pos += guest_window_rect_.OffsetFromOrigin();
|
| - if (embedder_web_contents()->GetBrowserPluginGuest()) {
|
| + if (embedder_web_contents_->GetBrowserPluginGuest()) {
|
| BrowserPluginGuest* embedder_guest =
|
| - embedder_web_contents()->GetBrowserPluginGuest();
|
| + embedder_web_contents_->GetBrowserPluginGuest();
|
| screen_pos += embedder_guest->guest_window_rect_.OffsetFromOrigin();
|
| }
|
| return screen_pos;
|
| @@ -631,50 +634,6 @@ void BrowserPluginGuest::OnReclaimCompositorResources(
|
| params.ack);
|
| }
|
|
|
| -void BrowserPluginGuest::OnHandleInputEvent(
|
| - int browser_plugin_instance_id,
|
| - const gfx::Rect& guest_window_rect,
|
| - const blink::WebInputEvent* event) {
|
| - RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>(
|
| - GetWebContents()->GetRenderViewHost());
|
| -
|
| - if (blink::WebInputEvent::isMouseEventType(event->type)) {
|
| - guest_rvh->ForwardMouseEvent(
|
| - *static_cast<const blink::WebMouseEvent*>(event));
|
| - return;
|
| - }
|
| -
|
| - if (event->type == blink::WebInputEvent::MouseWheel) {
|
| - guest_rvh->ForwardWheelEvent(
|
| - *static_cast<const blink::WebMouseWheelEvent*>(event));
|
| - return;
|
| - }
|
| -
|
| - if (blink::WebInputEvent::isKeyboardEventType(event->type)) {
|
| - RenderViewHostImpl* embedder_rvh = static_cast<RenderViewHostImpl*>(
|
| - embedder_web_contents_->GetRenderViewHost());
|
| - if (!embedder_rvh->GetLastKeyboardEvent())
|
| - return;
|
| - NativeWebKeyboardEvent keyboard_event(
|
| - *embedder_rvh->GetLastKeyboardEvent());
|
| - guest_rvh->ForwardKeyboardEvent(keyboard_event);
|
| - return;
|
| - }
|
| -
|
| - if (blink::WebInputEvent::isTouchEventType(event->type)) {
|
| - guest_rvh->ForwardTouchEventWithLatencyInfo(
|
| - *static_cast<const blink::WebTouchEvent*>(event),
|
| - ui::LatencyInfo());
|
| - return;
|
| - }
|
| -
|
| - if (blink::WebInputEvent::isGestureEventType(event->type)) {
|
| - guest_rvh->ForwardGestureEvent(
|
| - *static_cast<const blink::WebGestureEvent*>(event));
|
| - return;
|
| - }
|
| -}
|
| -
|
| void BrowserPluginGuest::OnLockMouse(bool user_gesture,
|
| bool last_unlocked_by_target,
|
| bool privileged) {
|
|
|