| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // on the permissions if they are in the ASK state. | 50 // on the permissions if they are in the ASK state. |
| 51 void ForcePermissionDeniedTemporarily(); | 51 void ForcePermissionDeniedTemporarily(); |
| 52 | 52 |
| 53 // Answers a permission request with (possibly) different values for | 53 // Answers a permission request with (possibly) different values for |
| 54 // |audio_accepted| and |video_accepted|. Intended for use from | 54 // |audio_accepted| and |video_accepted|. Intended for use from |
| 55 // MediaStreamInfobarDelegateAndroid. | 55 // MediaStreamInfobarDelegateAndroid. |
| 56 // TODO(tsergeant): Remove this by refactoring Android to use | 56 // TODO(tsergeant): Remove this by refactoring Android to use |
| 57 // PermissionRequest instead of a custom infobar delegate. | 57 // PermissionRequest instead of a custom infobar delegate. |
| 58 void GroupedRequestFinished(bool audio_accepted, bool video_accepted); | 58 void GroupedRequestFinished(bool audio_accepted, bool video_accepted); |
| 59 | 59 |
| 60 bool ShouldShowPersistenceToggle() const override; |
| 61 |
| 60 // PermissionRequest: | 62 // PermissionRequest: |
| 61 int GetIconId() const override; | 63 int GetIconId() const override; |
| 62 base::string16 GetMessageTextFragment() const override; | 64 base::string16 GetMessageTextFragment() const override; |
| 63 GURL GetOrigin() const override; | 65 GURL GetOrigin() const override; |
| 64 void PermissionGranted() override; | 66 void PermissionGranted() override; |
| 65 void PermissionDenied() override; | 67 void PermissionDenied() override; |
| 66 void Cancelled() override; | 68 void Cancelled() override; |
| 67 void RequestFinished() override; | 69 void RequestFinished() override; |
| 68 PermissionRequestType GetPermissionRequestType() const override; | 70 PermissionRequestType GetPermissionRequestType() const override; |
| 69 | 71 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // was created. | 126 // was created. |
| 125 TabSpecificContentSettings* content_settings_; | 127 TabSpecificContentSettings* content_settings_; |
| 126 | 128 |
| 127 // The original request for access to devices. | 129 // The original request for access to devices. |
| 128 const content::MediaStreamRequest request_; | 130 const content::MediaStreamRequest request_; |
| 129 | 131 |
| 130 // The callback that needs to be Run to notify WebRTC of whether access to | 132 // The callback that needs to be Run to notify WebRTC of whether access to |
| 131 // audio/video devices was granted or not. | 133 // audio/video devices was granted or not. |
| 132 content::MediaResponseCallback callback_; | 134 content::MediaResponseCallback callback_; |
| 133 | 135 |
| 134 // Whether the permissions granted or denied by the user should be persisted. | |
| 135 bool persist_permission_changes_; | |
| 136 | |
| 137 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 136 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
| 138 }; | 137 }; |
| 139 | 138 |
| 140 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 139 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
| OLD | NEW |