| 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 26 matching lines...) Expand all Loading... |
| 37 explicit MediaStreamUIController(SettingsRequester* requester); | 37 explicit MediaStreamUIController(SettingsRequester* requester); |
| 38 virtual ~MediaStreamUIController(); | 38 virtual ~MediaStreamUIController(); |
| 39 | 39 |
| 40 // Called when a new request for the capture device access is made. | 40 // Called when a new request for the capture device access is made. |
| 41 // Users are responsbile for cancel the pending request if they don't wait | 41 // Users are responsbile for cancel the pending request if they don't wait |
| 42 // for the result from the UI. | 42 // for the result from the UI. |
| 43 void MakeUIRequest(const std::string& label, | 43 void MakeUIRequest(const std::string& label, |
| 44 int render_process_id, | 44 int render_process_id, |
| 45 int render_view_id, | 45 int render_view_id, |
| 46 const StreamOptions& stream_components, | 46 const StreamOptions& stream_components, |
| 47 const GURL& security_origin); | 47 const GURL& security_origin, |
| 48 MediaStreamRequestType request_type); |
| 48 | 49 |
| 49 // Called to cancel a pending UI request of capture device access when the | 50 // Called to cancel a pending UI request of capture device access when the |
| 50 // user has no action for the media stream InfoBar. | 51 // user has no action for the media stream InfoBar. |
| 51 void CancelUIRequest(const std::string& label); | 52 void CancelUIRequest(const std::string& label); |
| 52 | 53 |
| 53 // Called by the InfoBar when the user grants/denies access to some devices | 54 // 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 | 55 // 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 | 56 // 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. | 57 // the requester. An empty list of devices means that access has been denied. |
| 57 // This method must be called on the IO thread. | 58 // This method must be called on the IO thread. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 bool use_fake_ui_; | 100 bool use_fake_ui_; |
| 100 | 101 |
| 101 base::WeakPtrFactory<MediaStreamUIController> weak_ptr_factory_; | 102 base::WeakPtrFactory<MediaStreamUIController> weak_ptr_factory_; |
| 102 | 103 |
| 103 DISALLOW_COPY_AND_ASSIGN(MediaStreamUIController); | 104 DISALLOW_COPY_AND_ASSIGN(MediaStreamUIController); |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 } // namespace content | 107 } // namespace content |
| 107 | 108 |
| 108 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_CONTROLLER_H_ | 109 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_UI_CONTROLLER_H_ |
| OLD | NEW |