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

Side by Side Diff: chrome/browser/media/media_capture_devices_dispatcher.h

Issue 483523006: Check all settings when checking mic and camera access (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix for Android. Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
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
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
87 // Helper to get the default devices which can be used by the media request. 93 // Helper to get the default devices which can be used by the media request.
88 // Uses the first available devices if the default devices are not available. 94 // Uses the first available devices if the default devices are not available.
89 // If the return list is empty, it means there is no available device on the 95 // If the return list is empty, it means there is no available device on the
90 // OS. 96 // OS.
91 // Called on the UI thread. 97 // Called on the UI thread.
92 void GetDefaultDevicesForProfile(Profile* profile, 98 void GetDefaultDevicesForProfile(Profile* profile,
93 bool audio, 99 bool audio,
94 bool video, 100 bool video,
95 content::MediaStreamDevices* devices); 101 content::MediaStreamDevices* devices);
96 102
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 int render_frame_id; 245 int render_frame_id;
240 int page_request_id; 246 int page_request_id;
241 }; 247 };
242 typedef std::list<DesktopCaptureSession> DesktopCaptureSessions; 248 typedef std::list<DesktopCaptureSession> DesktopCaptureSessions;
243 DesktopCaptureSessions desktop_capture_sessions_; 249 DesktopCaptureSessions desktop_capture_sessions_;
244 250
245 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher); 251 DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher);
246 }; 252 };
247 253
248 #endif // CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ 254 #endif // CHROME_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698