| 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 // MediaStreamDeviceSettings is used to decide which of the available capture | 5 // MediaStreamDeviceSettings is used to decide which of the available capture |
| 6 // device to use as well as getting user permission to use the capture device. | 6 // device to use as well as getting user permission to use the capture device. |
| 7 // There will be one instance of MediaStreamDeviceSettings handling all | 7 // There will be one instance of MediaStreamDeviceSettings handling all |
| 8 // requests. | 8 // requests. |
| 9 | 9 |
| 10 // Expected call flow: | 10 // Expected call flow: |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 explicit MediaStreamDeviceSettings(SettingsRequester* requester); | 38 explicit MediaStreamDeviceSettings(SettingsRequester* requester); |
| 39 virtual ~MediaStreamDeviceSettings(); | 39 virtual ~MediaStreamDeviceSettings(); |
| 40 | 40 |
| 41 // Called when a new request of capture device usage is made. | 41 // Called when a new request of capture device usage is made. |
| 42 void RequestCaptureDeviceUsage(const std::string& label, | 42 void RequestCaptureDeviceUsage(const std::string& label, |
| 43 int render_process_id, | 43 int render_process_id, |
| 44 int render_view_id, | 44 int render_view_id, |
| 45 const StreamOptions& stream_components, | 45 const StreamOptions& stream_components, |
| 46 const GURL& security_origin); | 46 const GURL& security_origin); |
| 47 | 47 |
| 48 // Called to remove a pending request of capture device usage when the user |
| 49 // has no action for the media stream InfoBar. |
| 50 void RemovePendingCaptureRequest(const std::string& label); |
| 51 |
| 48 // Called to pass in an array of available devices for a request represented | 52 // Called to pass in an array of available devices for a request represented |
| 49 // by |label|. There could be multiple calls for a request. | 53 // by |label|. There could be multiple calls for a request. |
| 50 void AvailableDevices(const std::string& label, MediaStreamType stream_type, | 54 void AvailableDevices(const std::string& label, MediaStreamType stream_type, |
| 51 const StreamDeviceInfoArray& devices); | 55 const StreamDeviceInfoArray& devices); |
| 52 | 56 |
| 53 // Called by the InfoBar when the user grants/denies access to some devices | 57 // Called by the InfoBar when the user grants/denies access to some devices |
| 54 // to the webpage. This is placed here, so the request can be cleared from the | 58 // to the webpage. This is placed here, so the request can be cleared from the |
| 55 // list of pending requests, instead of letting the InfoBar itself respond to | 59 // list of pending requests, instead of letting the InfoBar itself respond to |
| 56 // the requester. An empty list of devices means that access has been denied. | 60 // the requester. An empty list of devices means that access has been denied. |
| 57 // This method must be called on the IO thread. | 61 // This method must be called on the IO thread. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 83 | 87 |
| 84 // See comment above for method UseFakeUI. Used for automated testing. | 88 // See comment above for method UseFakeUI. Used for automated testing. |
| 85 bool use_fake_ui_; | 89 bool use_fake_ui_; |
| 86 | 90 |
| 87 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); | 91 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); |
| 88 }; | 92 }; |
| 89 | 93 |
| 90 } // namespace media_stream | 94 } // namespace media_stream |
| 91 | 95 |
| 92 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ | 96 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ |
| OLD | NEW |