OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef EXTENSIONS_SHELL_BROWSER_MEDIA_CAPTURE_UTIL_H_ | 5 #ifndef EXTENSIONS_SHELL_BROWSER_MEDIA_CAPTURE_UTIL_H_ |
6 #define EXTENSIONS_SHELL_BROWSER_MEDIA_CAPTURE_UTIL_H_ | 6 #define EXTENSIONS_SHELL_BROWSER_MEDIA_CAPTURE_UTIL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/public/common/media_stream_request.h" | 9 #include "content/public/common/media_stream_request.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 // Grants access to audio and video capture devices. | 21 // Grants access to audio and video capture devices. |
22 // * If the caller requests specific device ids, grants access to those. | 22 // * If the caller requests specific device ids, grants access to those. |
23 // * If the caller does not request specific ids, grants access to the first | 23 // * If the caller does not request specific ids, grants access to the first |
24 // available device. | 24 // available device. |
25 // Usually used as a helper for media capture ProcessMediaAccessRequest(). | 25 // Usually used as a helper for media capture ProcessMediaAccessRequest(). |
26 void GrantMediaStreamRequest(content::WebContents* web_contents, | 26 void GrantMediaStreamRequest(content::WebContents* web_contents, |
27 const content::MediaStreamRequest& request, | 27 const content::MediaStreamRequest& request, |
28 const content::MediaResponseCallback& callback, | 28 const content::MediaResponseCallback& callback, |
29 const Extension* extension); | 29 const Extension* extension); |
30 | 30 |
| 31 // Verifies that the extension has permission for |type|. If not, crash. |
| 32 void VerifyMediaAccessPermission(content::MediaStreamType type, |
| 33 const Extension* extension); |
| 34 |
31 } // namespace media_capture_util | 35 } // namespace media_capture_util |
32 } // namespace extensions | 36 } // namespace extensions |
33 | 37 |
34 #endif // EXTENSIONS_SHELL_BROWSER_MEDIA_CAPTURE_UTIL_H_ | 38 #endif // EXTENSIONS_SHELL_BROWSER_MEDIA_CAPTURE_UTIL_H_ |
OLD | NEW |