| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // PermissionBubbleRequest: | 53 // PermissionBubbleRequest: |
| 54 int GetIconId() const override; | 54 int GetIconId() const override; |
| 55 base::string16 GetMessageText() const override; | 55 base::string16 GetMessageText() const override; |
| 56 base::string16 GetMessageTextFragment() const override; | 56 base::string16 GetMessageTextFragment() const override; |
| 57 GURL GetOrigin() const override; | 57 GURL GetOrigin() const override; |
| 58 void PermissionGranted() override; | 58 void PermissionGranted() override; |
| 59 void PermissionDenied() override; | 59 void PermissionDenied() override; |
| 60 void Cancelled() override; | 60 void Cancelled() override; |
| 61 void RequestFinished() override; | 61 void RequestFinished() override; |
| 62 PermissionBubbleType GetPermissionBubbleType() const override; |
| 62 | 63 |
| 63 private: | 64 private: |
| 64 // Returns a list of devices available for the request for the given | 65 // Returns a list of devices available for the request for the given |
| 65 // audio/video permission settings. | 66 // audio/video permission settings. |
| 66 content::MediaStreamDevices GetDevices(ContentSetting audio_setting, | 67 content::MediaStreamDevices GetDevices(ContentSetting audio_setting, |
| 67 ContentSetting video_setting); | 68 ContentSetting video_setting); |
| 68 | 69 |
| 69 // Runs |callback_| with the given audio/video permission settings. If neither | 70 // Runs |callback_| with the given audio/video permission settings. If neither |
| 70 // |audio_setting| or |video_setting| is set to allow, |denial_reason| should | 71 // |audio_setting| or |video_setting| is set to allow, |denial_reason| should |
| 71 // be set to the error to be reported when running |callback_|. | 72 // be set to the error to be reported when running |callback_|. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // audio/video devices was granted or not. | 125 // audio/video devices was granted or not. |
| 125 content::MediaResponseCallback callback_; | 126 content::MediaResponseCallback callback_; |
| 126 | 127 |
| 127 // Whether the permissions granted or denied by the user should be persisted. | 128 // Whether the permissions granted or denied by the user should be persisted. |
| 128 bool persist_permission_changes_; | 129 bool persist_permission_changes_; |
| 129 | 130 |
| 130 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); | 131 DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ | 134 #endif // CHROME_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ |
| OLD | NEW |