| 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_embedder_helper.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" |
| 6 | 6 |
| 7 #include "content/browser/browser_plugin/browser_plugin_embedder.h" | 7 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 8 #include "content/browser/renderer_host/render_view_host_impl.h" | 8 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 9 #include "content/common/browser_plugin_messages.h" | 9 #include "content/common/browser_plugin_messages.h" |
| 10 #include "content/common/view_messages.h" | 10 #include "content/common/view_messages.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 const gfx::Rect* guest_rect = | 86 const gfx::Rect* guest_rect = |
| 87 reinterpret_cast<const gfx::Rect*>(guest_rect_data); | 87 reinterpret_cast<const gfx::Rect*>(guest_rect_data); |
| 88 const WebKit::WebInputEvent* input_event = | 88 const WebKit::WebInputEvent* input_event = |
| 89 reinterpret_cast<const WebKit::WebInputEvent*>(input_event_data); | 89 reinterpret_cast<const WebKit::WebInputEvent*>(input_event_data); |
| 90 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( | 90 RenderViewHostImpl* rvh = static_cast<RenderViewHostImpl*>( |
| 91 render_view_host()); | 91 render_view_host()); |
| 92 | 92 |
| 93 // Convert the window coordinates into screen coordinates. | 93 // Convert the window coordinates into screen coordinates. |
| 94 gfx::Rect guest_screen_rect(*guest_rect); | 94 gfx::Rect guest_screen_rect(*guest_rect); |
| 95 if (rvh->GetView()) | 95 if (rvh->GetView()) |
| 96 guest_screen_rect.Offset(rvh->GetView()->GetViewBounds().origin()); | 96 guest_screen_rect.Offset( |
| 97 rvh->GetView()->GetViewBounds().DistanceFromOrigin()); |
| 97 | 98 |
| 98 IPC::Message* reply_message = | 99 IPC::Message* reply_message = |
| 99 IPC::SyncMessage::GenerateReply(&message); | 100 IPC::SyncMessage::GenerateReply(&message); |
| 100 embedder_->HandleInputEvent(instance_id, | 101 embedder_->HandleInputEvent(instance_id, |
| 101 rvh, | 102 rvh, |
| 102 guest_screen_rect, | 103 guest_screen_rect, |
| 103 *input_event, | 104 *input_event, |
| 104 reply_message); | 105 reply_message); |
| 105 } | 106 } |
| 106 | 107 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 int instance_id, | 167 int instance_id, |
| 167 WebKit::WebDragStatus drag_status, | 168 WebKit::WebDragStatus drag_status, |
| 168 const WebDropData& drop_data, | 169 const WebDropData& drop_data, |
| 169 WebKit::WebDragOperationsMask drag_mask, | 170 WebKit::WebDragOperationsMask drag_mask, |
| 170 const gfx::Point& location) { | 171 const gfx::Point& location) { |
| 171 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, | 172 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, |
| 172 location); | 173 location); |
| 173 } | 174 } |
| 174 | 175 |
| 175 } // namespace content | 176 } // namespace content |
| OLD | NEW |