| 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.h" | 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 8 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
| 9 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h" | 9 #include "content/browser/browser_plugin/browser_plugin_guest_manager.h" |
| 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" | 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, | 103 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, |
| 104 OnPluginAtPositionResponse) | 104 OnPluginAtPositionResponse) |
| 105 IPC_MESSAGE_HANDLER_GENERIC(DragHostMsg_UpdateDragCursor, | 105 IPC_MESSAGE_HANDLER_GENERIC(DragHostMsg_UpdateDragCursor, |
| 106 OnUpdateDragCursor(&handled)); | 106 OnUpdateDragCursor(&handled)); |
| 107 IPC_MESSAGE_UNHANDLED(handled = false) | 107 IPC_MESSAGE_UNHANDLED(handled = false) |
| 108 IPC_END_MESSAGE_MAP() | 108 IPC_END_MESSAGE_MAP() |
| 109 return handled; | 109 return handled; |
| 110 } | 110 } |
| 111 | 111 |
| 112 void BrowserPluginEmbedder::DragSourceEndedAt(int client_x, int client_y, | 112 void BrowserPluginEmbedder::DragSourceEndedAt(int client_x, int client_y, |
| 113 int screen_x, int screen_y, WebKit::WebDragOperation operation) { | 113 int screen_x, int screen_y, blink::WebDragOperation operation) { |
| 114 if (guest_started_drag_.get()) { | 114 if (guest_started_drag_.get()) { |
| 115 gfx::Point guest_offset = | 115 gfx::Point guest_offset = |
| 116 guest_started_drag_->GetScreenCoordinates(gfx::Point()); | 116 guest_started_drag_->GetScreenCoordinates(gfx::Point()); |
| 117 guest_started_drag_->DragSourceEndedAt(client_x - guest_offset.x(), | 117 guest_started_drag_->DragSourceEndedAt(client_x - guest_offset.x(), |
| 118 client_y - guest_offset.y(), screen_x, screen_y, operation); | 118 client_y - guest_offset.y(), screen_x, screen_y, operation); |
| 119 } | 119 } |
| 120 } | 120 } |
| 121 | 121 |
| 122 void BrowserPluginEmbedder::DragSourceMovedTo(int client_x, int client_y, | 122 void BrowserPluginEmbedder::DragSourceMovedTo(int client_x, int client_y, |
| 123 int screen_x, int screen_y) { | 123 int screen_x, int screen_y) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 if (guest) | 224 if (guest) |
| 225 render_view_host = guest->GetWebContents()->GetRenderViewHost(); | 225 render_view_host = guest->GetWebContents()->GetRenderViewHost(); |
| 226 else // No plugin, use embedder's RenderViewHost. | 226 else // No plugin, use embedder's RenderViewHost. |
| 227 render_view_host = web_contents()->GetRenderViewHost(); | 227 render_view_host = web_contents()->GetRenderViewHost(); |
| 228 | 228 |
| 229 callback_iter->second.Run(render_view_host, position.x(), position.y()); | 229 callback_iter->second.Run(render_view_host, position.x(), position.y()); |
| 230 pending_get_render_view_callbacks_.erase(callback_iter); | 230 pending_get_render_view_callbacks_.erase(callback_iter); |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace content | 233 } // namespace content |
| OLD | NEW |