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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Returns true if the UI is already processing a request for this render | 74 // Returns true if the UI is already processing a request for this render |
75 // view. | 75 // view. |
76 bool IsUiBusy(int render_view_id, int render_process_id); | 76 bool IsUiBusy(int render_view_id, int render_process_id); |
77 | 77 |
78 // Finds a request ready to be sent to UI for user approval. | 78 // Finds a request ready to be sent to UI for user approval. |
79 std::string FindReadyRequestForView(int render_view_id, | 79 std::string FindReadyRequestForView(int render_view_id, |
80 int render_process_id); | 80 int render_process_id); |
81 | 81 |
82 // Posts a request to be approved/denied by UI. | 82 // Posts a request to be approved/denied by UI. |
83 void PostRequestToUi(const std::string& label); | 83 void PostRequestToUi(const std::string& label); |
| 84 // Sends the request to the appropriate WebContents. |
| 85 void DoRequest(const MediaStreamDeviceSettingsRequest* request, |
| 86 const content::MediaResponseCallback& callback); |
84 | 87 |
85 SettingsRequester* requester_; | 88 SettingsRequester* requester_; |
86 SettingsRequests requests_; | 89 SettingsRequests requests_; |
87 | 90 |
88 // See comment above for method UseFakeUI. Used for automated testing. | 91 // See comment above for method UseFakeUI. Used for automated testing. |
89 bool use_fake_ui_; | 92 bool use_fake_ui_; |
90 | 93 |
91 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); | 94 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace media_stream | 97 } // namespace media_stream |
95 | 98 |
96 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ | 99 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ |
OLD | NEW |