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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 11759020: Implement a TODO in the media code: Change a "const MediaStreamRequest*" arg in various APIs to "co… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 months 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 "chrome/browser/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 641
642 void ExtensionHost::RenderViewReady() { 642 void ExtensionHost::RenderViewReady() {
643 content::NotificationService::current()->Notify( 643 content::NotificationService::current()->Notify(
644 chrome::NOTIFICATION_EXTENSION_HOST_CREATED, 644 chrome::NOTIFICATION_EXTENSION_HOST_CREATED,
645 content::Source<Profile>(profile_), 645 content::Source<Profile>(profile_),
646 content::Details<ExtensionHost>(this)); 646 content::Details<ExtensionHost>(this));
647 } 647 }
648 648
649 void ExtensionHost::RequestMediaAccessPermission( 649 void ExtensionHost::RequestMediaAccessPermission(
650 content::WebContents* web_contents, 650 content::WebContents* web_contents,
651 const content::MediaStreamRequest* request, 651 const content::MediaStreamRequest& request,
652 const content::MediaResponseCallback& callback) { 652 const content::MediaResponseCallback& callback) {
653 // Get the preferred default devices for the request. 653 // Get the preferred default devices for the request.
654 content::MediaStreamDevices devices; 654 content::MediaStreamDevices devices;
655 media::GetDefaultDevicesForProfile( 655 media::GetDefaultDevicesForProfile(
656 profile_, 656 profile_,
657 content::IsAudioMediaType(request->audio_type), 657 content::IsAudioMediaType(request.audio_type),
658 content::IsVideoMediaType(request->video_type), 658 content::IsVideoMediaType(request.video_type),
659 &devices); 659 &devices);
660 660
661 // For tab capture device, we require the tabCapture permission. 661 // For tab capture device, we require the tabCapture permission.
662 RequestMediaAccessPermissionHelper::AuthorizeRequest( 662 RequestMediaAccessPermissionHelper::AuthorizeRequest(
663 devices, request, callback, extension(), false); 663 devices, request, callback, extension(), false);
664 } 664 }
665 665
666 } // namespace extensions 666 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/media/media_stream_devices_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698