| 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 // MediaStreamUIController is used to decide which of the available capture | 5 // MediaStreamUIController 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 MediaStreamUIController(SettingsRequester* requester); | 38 explicit MediaStreamUIController(SettingsRequester* requester); |
| 39 virtual ~MediaStreamUIController(); | 39 virtual ~MediaStreamUIController(); |
| 40 | 40 |
| 41 // Called when a new request for the capture device access is made. | 41 // Called when a new request for the capture device access is made. |
| 42 // Users are responsbile for cancel the pending request if they don't wait | 42 // Users are responsbile for cancel the pending request if they don't wait |
| 43 // for the result from the UI. | 43 // for the result from the UI. |
| 44 void MakeUIRequest(const std::string& label, | 44 void MakeUIRequest(const std::string& label, |
| 45 int render_process_id, | 45 int render_process_id, |
| 46 int render_view_id, | 46 int render_view_id, |
| 47 const StreamOptions& stream_components, | 47 const StreamOptions& stream_components, |
| 48 const GURL& security_origin); | 48 const GURL& security_origin, |
| 49 MediaStreamRequestType request_type); |
| 49 | 50 |
| 50 // Called to cancel a pending UI request of capture device access when the | 51 // Called to cancel a pending UI request of capture device access when the |
| 51 // user has no action for the media stream InfoBar. | 52 // user has no action for the media stream InfoBar. |
| 52 void CancelUIRequest(const std::string& label); | 53 void CancelUIRequest(const std::string& label); |
| 53 | 54 |
| 54 // Called to pass in an array of available devices for a request represented | 55 // Called to pass in an array of available devices for a request represented |
| 55 // by |label|. There could be multiple calls for a request. | 56 // by |label|. There could be multiple calls for a request. |
| 56 // TODO(xians): use the monitor to get a up-to-date device list and remove | 57 // TODO(xians): use the monitor to get a up-to-date device list and remove |
| 57 // this API. | 58 // this API. |
| 58 void AddAvailableDevicesToRequest( | 59 void AddAvailableDevicesToRequest( |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 bool use_fake_ui_; | 110 bool use_fake_ui_; |
| 110 | 111 |
| 111 base::WeakPtrFactory<MediaStreamUIController> weak_ptr_factory_; | 112 base::WeakPtrFactory<MediaStreamUIController> weak_ptr_factory_; |
| 112 | 113 |
| 113 DISALLOW_COPY_AND_ASSIGN(MediaStreamUIController); | 114 DISALLOW_COPY_AND_ASSIGN(MediaStreamUIController); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace content | 117 } // namespace content |
| 117 | 118 |
| 118 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_CONTROLLER_H_ | 119 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_CONTROLLER_H_ |
| OLD | NEW |