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 // view. | 74 // view. |
75 bool IsUiBusy(int render_view_id, int render_process_id); | 75 bool IsUiBusy(int render_view_id, int render_process_id); |
76 | 76 |
77 // Finds a request ready to be sent to UI for user approval. | 77 // Finds a request ready to be sent to UI for user approval. |
78 std::string FindReadyRequestForView(int render_view_id, | 78 std::string FindReadyRequestForView(int render_view_id, |
79 int render_process_id); | 79 int render_process_id); |
80 | 80 |
81 // Posts a request to be approved/denied by UI. | 81 // Posts a request to be approved/denied by UI. |
82 void PostRequestToUi(const std::string& label); | 82 void PostRequestToUi(const std::string& label); |
83 | 83 |
| 84 // Posts a request to fake UI which is used for testing purpose. |
| 85 void PostRequstToFakeUI(const std::string& label); |
| 86 |
84 SettingsRequester* requester_; | 87 SettingsRequester* requester_; |
85 SettingsRequests requests_; | 88 SettingsRequests requests_; |
86 | 89 |
87 // See comment above for method UseFakeUI. Used for automated testing. | 90 // See comment above for method UseFakeUI. Used for automated testing. |
88 bool use_fake_ui_; | 91 bool use_fake_ui_; |
89 | 92 |
90 base::WeakPtrFactory<MediaStreamDeviceSettings> weak_ptr_factory_; | 93 base::WeakPtrFactory<MediaStreamDeviceSettings> weak_ptr_factory_; |
91 | 94 |
92 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); | 95 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceSettings); |
93 }; | 96 }; |
94 | 97 |
95 } // namespace media_stream | 98 } // namespace media_stream |
96 | 99 |
97 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ | 100 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_DEVICE_SETTINGS_H_ |
OLD | NEW |