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_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // Registers the prefs backing the audio and video policies. | 100 // Registers the prefs backing the audio and video policies. |
101 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 101 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
102 | 102 |
103 ~MediaStreamDevicesController(); | 103 ~MediaStreamDevicesController(); |
104 | 104 |
105 bool IsAskingForAudio() const; | 105 bool IsAskingForAudio() const; |
106 bool IsAskingForVideo() const; | 106 bool IsAskingForVideo() const; |
107 | 107 |
108 // Called when a permission prompt has been answered, with the |response| and | 108 // Called when a permission prompt has been answered, with the |response| and |
109 // whether the choice should be persisted. | 109 // whether the choice should be persisted. |
| 110 // TODO(raymes): Remove this once crbug.com/606138 is fixed. |
110 void PromptAnswered(ContentSetting response, bool persist); | 111 void PromptAnswered(ContentSetting response, bool persist); |
111 | 112 |
| 113 // Called when a permission prompt is answered through the PermissionManager. |
| 114 void PromptAnsweredGroupedRequest( |
| 115 const std::vector<ContentSetting>& responses); |
| 116 |
112 #if defined(OS_ANDROID) | 117 #if defined(OS_ANDROID) |
113 // Called when the Android OS-level prompt is answered. | 118 // Called when the Android OS-level prompt is answered. |
114 void AndroidOSPromptAnswered(bool allowed); | 119 void AndroidOSPromptAnswered(bool allowed); |
115 #endif // defined(OS_ANDROID) | 120 #endif // defined(OS_ANDROID) |
116 | 121 |
117 // Called when the request is finished and no prompt is required. | 122 // Called when the request is finished and no prompt is required. |
118 void RequestFinishedNoPrompt(); | 123 void RequestFinishedNoPrompt(); |
119 | 124 |
120 private: | 125 private: |
121 friend class MediaStreamDevicesControllerTest; | 126 friend class MediaStreamDevicesControllerTest; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // The callback that needs to be Run to notify WebRTC of whether access to | 188 // The callback that needs to be Run to notify WebRTC of whether access to |
184 // audio/video devices was granted or not. | 189 // audio/video devices was granted or not. |
185 content::MediaResponseCallback callback_; | 190 content::MediaResponseCallback callback_; |
186 | 191 |
187 std::unique_ptr<PermissionPromptDelegate> delegate_; | 192 std::unique_ptr<PermissionPromptDelegate> delegate_; |
188 | 193 |
189 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 194 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
190 }; | 195 }; |
191 | 196 |
192 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 197 #endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
OLD | NEW |