Chromium Code Reviews| 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 // MediaStreamManager is used to open/enumerate media capture devices (video | 5 // MediaStreamManager is used to open/enumerate media capture devices (video |
| 6 // supported now). Call flow: | 6 // supported now). Call flow: |
| 7 // 1. GenerateStream is called when a render process wants to use a capture | 7 // 1. GenerateStream is called when a render process wants to use a capture |
| 8 // device. | 8 // device. |
| 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to | 9 // 2. MediaStreamManager will ask MediaStreamUIController for permission to |
| 10 // use devices and for which device to use. | 10 // use devices and for which device to use. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 // This object gets deleted on the UI thread after the IO thread has been | 178 // This object gets deleted on the UI thread after the IO thread has been |
| 179 // destroyed. So we need to know when IO thread is being destroyed so that | 179 // destroyed. So we need to know when IO thread is being destroyed so that |
| 180 // we can delete VideoCaptureManager and AudioInputDeviceManager. Normally | 180 // we can delete VideoCaptureManager and AudioInputDeviceManager. Normally |
| 181 // this is handled by | 181 // this is handled by |
| 182 // base::MessageLoop::DestructionObserver::WillDestroyCurrentMessageLoop. | 182 // base::MessageLoop::DestructionObserver::WillDestroyCurrentMessageLoop. |
| 183 // But for some tests which use TestBrowserThreadBundle, we need to call | 183 // But for some tests which use TestBrowserThreadBundle, we need to call |
| 184 // WillDestroyCurrentMessageLoop explicitly because the notification happens | 184 // WillDestroyCurrentMessageLoop explicitly because the notification happens |
| 185 // too late. (see http://crbug.com/247525#c14). | 185 // too late. (see http://crbug.com/247525#c14). |
| 186 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; | 186 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; |
| 187 | 187 |
| 188 // Adds |message| to native logs for outstanding device requests. | |
| 189 void AddLogMessageOnUIThread(const std::string& message); | |
| 190 static void AddLogMessage(const std::string& message); | |
|
perkj_chrome
2014/01/22 10:03:29
Please document where these log messages are sent
vrk (LEFT CHROMIUM)
2014/01/23 21:46:32
Done. Let me know if you want more details.
| |
| 191 | |
| 188 protected: | 192 protected: |
| 189 // Used for testing. | 193 // Used for testing. |
| 190 MediaStreamManager(); | 194 MediaStreamManager(); |
| 191 | 195 |
| 192 private: | 196 private: |
| 193 // Contains all data needed to keep track of requests. | 197 // Contains all data needed to keep track of requests. |
| 194 class DeviceRequest; | 198 class DeviceRequest; |
| 195 | 199 |
| 196 // Cache enumerated device list. | 200 // Cache enumerated device list. |
| 197 struct EnumerationCache { | 201 struct EnumerationCache { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 | 352 |
| 349 bool use_fake_ui_; | 353 bool use_fake_ui_; |
| 350 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; | 354 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; |
| 351 | 355 |
| 352 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); | 356 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); |
| 353 }; | 357 }; |
| 354 | 358 |
| 355 } // namespace content | 359 } // namespace content |
| 356 | 360 |
| 357 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ | 361 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ |
| OLD | NEW |