| 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_AllowMediaAccess, |
| 61 OnAllowMediaAccess) |
| 60 IPC_MESSAGE_UNHANDLED(handled = false) | 62 IPC_MESSAGE_UNHANDLED(handled = false) |
| 61 IPC_END_MESSAGE_MAP() | 63 IPC_END_MESSAGE_MAP() |
| 62 return handled; | 64 return handled; |
| 63 } | 65 } |
| 64 | 66 |
| 65 void BrowserPluginEmbedderHelper::OnResizeGuest( | 67 void BrowserPluginEmbedderHelper::OnResizeGuest( |
| 66 int instance_id, | 68 int instance_id, |
| 67 const BrowserPluginHostMsg_ResizeGuest_Params& params) { | 69 const BrowserPluginHostMsg_ResizeGuest_Params& params) { |
| 68 embedder_->ResizeGuest(render_view_host(), instance_id, params); | 70 embedder_->ResizeGuest(render_view_host(), instance_id, params); |
| 69 } | 71 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 location); | 176 location); |
| 175 } | 177 } |
| 176 | 178 |
| 177 void BrowserPluginEmbedderHelper::OnSetAutoSize( | 179 void BrowserPluginEmbedderHelper::OnSetAutoSize( |
| 178 int instance_id, | 180 int instance_id, |
| 179 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, | 181 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, |
| 180 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { | 182 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { |
| 181 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params); | 183 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params); |
| 182 } | 184 } |
| 183 | 185 |
| 186 void BrowserPluginEmbedderHelper::OnAllowMediaAccess(int instance_id, |
| 187 int request_id, |
| 188 bool allow) { |
| 189 embedder_->AllowMediaAccess(instance_id, request_id, allow); |
| 190 } |
| 191 |
| 184 } // namespace content | 192 } // namespace content |
| OLD | NEW |