OLD | NEW |
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 #ifndef CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ |
6 #define CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Method called from WebCapturerDelegate implementations to process access | 78 // Method called from WebCapturerDelegate implementations to process access |
79 // requests. |extension| is set to NULL if request was made from a drive-by | 79 // requests. |extension| is set to NULL if request was made from a drive-by |
80 // page. | 80 // page. |
81 void ProcessMediaAccessRequest( | 81 void ProcessMediaAccessRequest( |
82 content::WebContents* web_contents, | 82 content::WebContents* web_contents, |
83 const content::MediaStreamRequest& request, | 83 const content::MediaStreamRequest& request, |
84 const content::MediaResponseCallback& callback, | 84 const content::MediaResponseCallback& callback, |
85 const extensions::Extension* extension); | 85 const extensions::Extension* extension); |
86 | 86 |
87 // Checks if we have media access permission. Note that this only checks the | |
88 // settings and does not query the user. | |
89 bool CheckMediaAccessPermission(content::BrowserContext* browser_context, | |
90 const GURL& security_origin, | |
91 content::MediaStreamType type); | |
92 | |
93 // Method called from WebCapturerDelegate implementations to check media | 87 // Method called from WebCapturerDelegate implementations to check media |
94 // access permission. Note that this does not query the user. | 88 // access permission. Note that this does not query the user. |
95 bool CheckMediaAccessPermission(content::WebContents* web_contents, | 89 bool CheckMediaAccessPermission(content::WebContents* web_contents, |
96 const GURL& security_origin, | 90 const GURL& security_origin, |
97 content::MediaStreamType type); | 91 content::MediaStreamType type); |
98 | 92 |
99 // Same as above but for an |extension|, which may not be NULL. | 93 // Same as above but for an |extension|, which may not be NULL. |
100 #if defined(ENABLE_EXTENSIONS) | 94 #if defined(ENABLE_EXTENSIONS) |
101 bool CheckMediaAccessPermission(content::WebContents* web_contents, | 95 bool CheckMediaAccessPermission(content::WebContents* web_contents, |
102 const GURL& security_origin, | 96 const GURL& security_origin, |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 int render_frame_id; | 245 int render_frame_id; |
252 int page_request_id; | 246 int page_request_id; |
253 }; | 247 }; |
254 typedef std::list<DesktopCaptureSession> DesktopCaptureSessions; | 248 typedef std::list<DesktopCaptureSession> DesktopCaptureSessions; |
255 DesktopCaptureSessions desktop_capture_sessions_; | 249 DesktopCaptureSessions desktop_capture_sessions_; |
256 | 250 |
257 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher); | 251 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher); |
258 }; | 252 }; |
259 | 253 |
260 #endif // CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ | 254 #endif // CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ |
OLD | NEW |