| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, | 46 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginDestroyed, |
| 47 OnPluginDestroyed); | 47 OnPluginDestroyed); |
| 48 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Go, OnGo) | 48 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Go, OnGo) |
| 49 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Stop, OnStop) | 49 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Stop, OnStop) |
| 50 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Reload, OnReload) | 50 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_Reload, OnReload) |
| 51 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_TerminateGuest, OnTerminateGuest) | 51 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_TerminateGuest, OnTerminateGuest) |
| 52 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, | 52 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, |
| 53 OnSetGuestVisibility) | 53 OnSetGuestVisibility) |
| 54 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate, | 54 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate, |
| 55 OnDragStatusUpdate) | 55 OnDragStatusUpdate) |
| 56 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetAutoSize) |
| 56 IPC_MESSAGE_UNHANDLED(handled = false) | 57 IPC_MESSAGE_UNHANDLED(handled = false) |
| 57 IPC_END_MESSAGE_MAP() | 58 IPC_END_MESSAGE_MAP() |
| 58 return handled; | 59 return handled; |
| 59 } | 60 } |
| 60 | 61 |
| 61 void BrowserPluginEmbedderHelper::OnResizeGuest( | 62 void BrowserPluginEmbedderHelper::OnResizeGuest( |
| 62 int instance_id, | 63 int instance_id, |
| 63 const BrowserPluginHostMsg_ResizeGuest_Params& params) { | 64 const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
| 64 embedder_->ResizeGuest(render_view_host(), instance_id, params); | 65 embedder_->ResizeGuest(render_view_host(), instance_id, params); |
| 65 } | 66 } |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 void BrowserPluginEmbedderHelper::OnDragStatusUpdate( | 164 void BrowserPluginEmbedderHelper::OnDragStatusUpdate( |
| 164 int instance_id, | 165 int instance_id, |
| 165 WebKit::WebDragStatus drag_status, | 166 WebKit::WebDragStatus drag_status, |
| 166 const WebDropData& drop_data, | 167 const WebDropData& drop_data, |
| 167 WebKit::WebDragOperationsMask drag_mask, | 168 WebKit::WebDragOperationsMask drag_mask, |
| 168 const gfx::Point& location) { | 169 const gfx::Point& location) { |
| 169 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, | 170 embedder_->DragStatusUpdate(instance_id, drag_status, drop_data, drag_mask, |
| 170 location); | 171 location); |
| 171 } | 172 } |
| 172 | 173 |
| 174 void BrowserPluginEmbedderHelper::OnSetAutoSize( |
| 175 int instance_id, |
| 176 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 177 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { |
| 178 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params); |
| 179 } |
| 180 |
| 173 } // namespace content | 181 } // namespace content |
| OLD | NEW |