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

Side by Side Diff: chrome/browser/ui/media_utils.cc

Issue 2629383002: Add functionality to get default media device IDs from user preferences. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/media_utils.h" 5 #include "chrome/browser/ui/media_utils.h"
6 6
7 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" 7 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "extensions/features/features.h" 10 #include "extensions/features/features.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ->CheckMediaAccessPermission( 58 ->CheckMediaAccessPermission(
59 web_contents, security_origin, type, extension); 59 web_contents, security_origin, type, extension);
60 } 60 }
61 return MediaCaptureDevicesDispatcher::GetInstance() 61 return MediaCaptureDevicesDispatcher::GetInstance()
62 ->CheckMediaAccessPermission(web_contents, security_origin, type); 62 ->CheckMediaAccessPermission(web_contents, security_origin, type);
63 #else 63 #else
64 return MediaCaptureDevicesDispatcher::GetInstance() 64 return MediaCaptureDevicesDispatcher::GetInstance()
65 ->CheckMediaAccessPermission(web_contents, security_origin, type); 65 ->CheckMediaAccessPermission(web_contents, security_origin, type);
66 #endif 66 #endif
67 } 67 }
68
69 std::string GetDefaultMediaDeviceId(content::WebContents* web_contents,
70 content::MediaStreamType type) {
71 Profile* profile =
72 Profile::FromBrowserContext(web_contents->GetBrowserContext());
73 return MediaCaptureDevicesDispatcher::GetInstance()
74 ->GetDefaultDeviceIdForProfile(profile, type);
75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698