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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_embedder.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.h" 5 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h" 8 #include "content/browser/browser_plugin/browser_plugin_embedder_helper.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h" 10 #include "content/browser/browser_plugin/browser_plugin_host_factory.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 void BrowserPluginEmbedder::SetAutoSize( 298 void BrowserPluginEmbedder::SetAutoSize(
299 int instance_id, 299 int instance_id,
300 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params, 300 const BrowserPluginHostMsg_AutoSize_Params& auto_size_params,
301 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) { 301 const BrowserPluginHostMsg_ResizeGuest_Params& resize_guest_params) {
302 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 302 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
303 if (guest) 303 if (guest)
304 guest->SetAutoSize(auto_size_params, resize_guest_params); 304 guest->SetAutoSize(auto_size_params, resize_guest_params);
305 } 305 }
306 306
307 void BrowserPluginEmbedder::AllowMediaAccess(int instance_id,
308 int request_id,
309 bool should_allow) {
310 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
311 if (guest)
312 guest->AllowMediaAccess(web_contents(), request_id, should_allow);
313 }
314
307 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) { 315 void BrowserPluginEmbedder::Go(int instance_id, int relative_index) {
308 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 316 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
309 if (guest) 317 if (guest)
310 guest->Go(relative_index); 318 guest->Go(relative_index);
311 } 319 }
312 320
313 void BrowserPluginEmbedder::Stop(int instance_id) { 321 void BrowserPluginEmbedder::Stop(int instance_id) {
314 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id); 322 BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
315 if (guest) 323 if (guest)
316 guest->Stop(); 324 guest->Stop();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 bool visible = *Details<bool>(details).ptr(); 377 bool visible = *Details<bool>(details).ptr();
370 WebContentsVisibilityChanged(visible); 378 WebContentsVisibilityChanged(visible);
371 break; 379 break;
372 } 380 }
373 default: 381 default:
374 NOTREACHED() << "Unexpected notification type: " << type; 382 NOTREACHED() << "Unexpected notification type: " << type;
375 } 383 }
376 } 384 }
377 385
378 } // namespace content 386 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698