Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder_helper.cc

Issue 11093080: <webview>: First stab at implementing media permission request for guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and reup patch for review. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_HANDLER(BrowserPluginHostMsg_SetAutoSize, OnSetAutoSize)
57 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse, 57 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_PluginAtPositionResponse,
58 OnPluginAtPositionResponse) 58 OnPluginAtPositionResponse)
59 IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllowMediaAccess,
60 OnAllowMediaAccess)
59 IPC_MESSAGE_UNHANDLED(handled = false) 61 IPC_MESSAGE_UNHANDLED(handled = false)
60 IPC_END_MESSAGE_MAP() 62 IPC_END_MESSAGE_MAP()
61 return handled; 63 return handled;
62 } 64 }
63 65
64 void BrowserPluginEmbedderHelper::OnResizeGuest( 66 void BrowserPluginEmbedderHelper::OnResizeGuest(
65 int instance_id, 67 int instance_id,
66 const BrowserPluginHostMsg_ResizeGuest_Params& params) { 68 const BrowserPluginHostMsg_ResizeGuest_Params& params) {
67 embedder_->ResizeGuest(render_view_host(), instance_id, params); 69 embedder_->ResizeGuest(render_view_host(), instance_id, params);
68 } 70 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 location); 180 location);
179 } 181 }
180 182
181 void BrowserPluginEmbedderHelper::OnSetAutoSize( 183 void BrowserPluginEmbedderHelper::OnSetAutoSize(
182 int instance_id, 184 int instance_id,
183 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, 185 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
184 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { 186 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) {
185 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params); 187 embedder_->SetAutoSize(instance_id, auto_size_params, resize_guest_params);
186 } 188 }
187 189
190 void BrowserPluginEmbedderHelper::OnAllowMediaAccess(int instance_id,
191 int request_id,
192 bool allow) {
193 embedder_->AllowMediaAccess(instance_id, request_id, allow);
194 }
195
188 } // namespace content 196 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698