OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |