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