| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_TerminateGuest, OnTerminateGuest) | 50 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_TerminateGuest, OnTerminateGuest) |
| 51 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, | 51 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetVisibility, |
| 52 OnSetGuestVisibility) | 52 OnSetGuestVisibility) |
| 53 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate, | 53 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_DragStatusUpdate, |
| 54 OnDragStatusUpdate) | 54 OnDragStatusUpdate) |
| 55 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetAutoSize) | 55 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetAutoSize) |
| 56 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, | 56 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, |
| 57 OnPluginAtPositionResponse) | 57 OnPluginAtPositionResponse) |
| 58 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_BuffersSwappedACK, | 58 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_BuffersSwappedACK, |
| 59 OnSwapBuffersACK) | 59 OnSwapBuffersACK) |
| 60 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_SetName, OnSetName) |
| 60 IPC_MESSAGE_UNHANDLED(handled = false) | 61 IPC_MESSAGE_UNHANDLED(handled = false) |
| 61 IPC_END_MESSAGE_MAP() | 62 IPC_END_MESSAGE_MAP() |
| 62 return handled; | 63 return handled; |
| 63 } | 64 } |
| 64 | 65 |
| 65 void BrowserPluginEmbedderHelper::OnResizeGuest( | 66 void BrowserPluginEmbedderHelper::OnResizeGuest( |
| 66 int instance_id, | 67 int instance_id, |
| 67 const BrowserPluginHostMsg_ResizeGuest_Params& params) { | 68 const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
| 68 embedder_->ResizeGuest(render_view_host(), instance_id, params); | 69 embedder_->ResizeGuest(render_view_host(), instance_id, params); |
| 69 } | 70 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 location); | 175 location); |
| 175 } | 176 } |
| 176 | 177 |
| 177 void BrowserPluginEmbedderHelper::OnSetAutoSize( | 178 void BrowserPluginEmbedderHelper::OnSetAutoSize( |
| 178 int instance_id, | 179 int instance_id, |
| 179 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | 180 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 180 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { | 181 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { |
| 181 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params); | 182 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params); |
| 182 } | 183 } |
| 183 | 184 |
| 185 void BrowserPluginEmbedderHelper::OnSetName(int instance_id, |
| 186 const std::string& name) { |
| 187 embedder_->SetName(instance_id, name); |
| 188 } |
| 189 |
| 184 } // namespace content | 190 } // namespace content |
| OLD | NEW |