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_STREAM_DEVICES_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // request and clears |microphone_requested_| or |webcam_requested_| flags if | 92 // request and clears |microphone_requested_| or |webcam_requested_| flags if |
93 // they are not allowed anymore. Returns the number of devices that are | 93 // they are not allowed anymore. Returns the number of devices that are |
94 // allowed after this step. If the count reaches zero the request can be | 94 // allowed after this step. If the count reaches zero the request can be |
95 // denied completely, else it still has to be partially fullfilled. | 95 // denied completely, else it still has to be partially fullfilled. |
96 int FilterBlockedByDefaultDevices(); | 96 int FilterBlockedByDefaultDevices(); |
97 | 97 |
98 // Returns true if the media section in content settings is set to | 98 // Returns true if the media section in content settings is set to |
99 // |CONTENT_SETTING_BLOCK|, otherwise returns false. | 99 // |CONTENT_SETTING_BLOCK|, otherwise returns false. |
100 bool IsDefaultMediaAccessBlocked() const; | 100 bool IsDefaultMediaAccessBlocked() const; |
101 | 101 |
102 // Returns true if the origin is a secure scheme, otherwise returns false. | |
103 bool IsSchemeSecure() const; | |
104 | |
105 // Store the permission to use media devices for the origin of the request. | 102 // Store the permission to use media devices for the origin of the request. |
106 // This is triggered when the users deny the request or allow the request | 103 // This is triggered when the users deny the request or allow the request |
107 // for https sites. | 104 // for https sites. |
108 void StorePermission(bool allowed) const; | 105 void StorePermission(bool allowed) const; |
109 | 106 |
110 // Notifies the content setting UI that the media stream access request or | 107 // Notifies the content setting UI that the media stream access request or |
111 // part of the request is accepted. | 108 // part of the request is accepted. |
112 void NotifyUIRequestAccepted() const; | 109 void NotifyUIRequestAccepted() const; |
113 | 110 |
114 // Notifies the content setting UI that the media stream access request or | 111 // Notifies the content setting UI that the media stream access request or |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // passed to the tab specific content settings when the permissions have been | 148 // passed to the tab specific content settings when the permissions have been |
152 // resolved. Currently only used by MEDIA_DEVICE_AUDIO_CAPTURE and | 149 // resolved. Currently only used by MEDIA_DEVICE_AUDIO_CAPTURE and |
153 // MEDIA_DEVICE_VIDEO_CAPTURE since those are the only types that require | 150 // MEDIA_DEVICE_VIDEO_CAPTURE since those are the only types that require |
154 // updates in the settings. | 151 // updates in the settings. |
155 MediaStreamTypeSettingsMap request_permissions_; | 152 MediaStreamTypeSettingsMap request_permissions_; |
156 | 153 |
157 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 154 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
158 }; | 155 }; |
159 | 156 |
160 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 157 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |