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_BROWSER_EXTENSION_HOST_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/public/common/media_stream_request.h" | 10 #include "content/public/common/media_stream_request.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 const gfx::Rect& initial_pos, | 49 const gfx::Rect& initial_pos, |
50 bool user_gesture) = 0; | 50 bool user_gesture) = 0; |
51 | 51 |
52 // Requests access to an audio or video media stream. Invokes |callback| | 52 // Requests access to an audio or video media stream. Invokes |callback| |
53 // with the response. | 53 // with the response. |
54 virtual void ProcessMediaAccessRequest( | 54 virtual void ProcessMediaAccessRequest( |
55 content::WebContents* web_contents, | 55 content::WebContents* web_contents, |
56 const content::MediaStreamRequest& request, | 56 const content::MediaStreamRequest& request, |
57 const content::MediaResponseCallback& callback, | 57 const content::MediaResponseCallback& callback, |
58 const Extension* extension) = 0; | 58 const Extension* extension) = 0; |
| 59 |
| 60 // Checks if we have permission to access the microphone or camera. Note that |
| 61 // this does not query the user. |type| must be MEDIA_DEVICE_AUDIO_CAPTURE |
| 62 // or MEDIA_DEVICE_VIDEO_CAPTURE. |
| 63 virtual bool CheckMediaAccessPermission(content::WebContents* web_contents, |
| 64 const GURL& security_origin, |
| 65 content::MediaStreamType type, |
| 66 const Extension* extension) = 0; |
59 }; | 67 }; |
60 | 68 |
61 } // namespace extensions | 69 } // namespace extensions |
62 | 70 |
63 #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ | 71 #endif // EXTENSIONS_BROWSER_EXTENSION_HOST_DELEGATE_H_ |
OLD | NEW |