Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Side by Side Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 2721113002: getUserMedia: handle the device starting status report. (Closed)
Patch Set: address nits Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 media capture devices (video supported 5 // MediaStreamManager is used to open media capture devices (video supported
6 // now). Call flow: 6 // 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 // render process is notified. 257 // render process is notified.
258 void StopRemovedDevice(MediaDeviceType type, const MediaDeviceInfo& device); 258 void StopRemovedDevice(MediaDeviceType type, const MediaDeviceInfo& device);
259 259
260 void SetGenerateStreamCallbackForTesting( 260 void SetGenerateStreamCallbackForTesting(
261 GenerateStreamTestCallback test_callback); 261 GenerateStreamTestCallback test_callback);
262 262
263 #if defined(OS_WIN) 263 #if defined(OS_WIN)
264 void FlushVideoCaptureThreadForTesting(); 264 void FlushVideoCaptureThreadForTesting();
265 #endif 265 #endif
266 266
267 // This method is called when all tracks are started.
268 void OnStreamStarted(const std::string& label);
269
267 private: 270 private:
268 // Contains all data needed to keep track of requests. 271 // Contains all data needed to keep track of requests.
269 class DeviceRequest; 272 class DeviceRequest;
270 273
271 // |DeviceRequests| is a list to ensure requests are processed in the order 274 // |DeviceRequests| is a list to ensure requests are processed in the order
272 // they arrive. The first member of the pair is the label of the 275 // they arrive. The first member of the pair is the label of the
273 // |DeviceRequest|. 276 // |DeviceRequest|.
274 using LabeledDeviceRequest = std::pair<std::string, DeviceRequest*>; 277 using LabeledDeviceRequest = std::pair<std::string, DeviceRequest*>;
275 using DeviceRequests = std::list<LabeledDeviceRequest>; 278 using DeviceRequests = std::list<LabeledDeviceRequest>;
276 279
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_; 428 std::map<int, base::Callback<void(const std::string&)>> log_callbacks_;
426 429
427 GenerateStreamTestCallback generate_stream_test_callback_; 430 GenerateStreamTestCallback generate_stream_test_callback_;
428 431
429 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 432 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
430 }; 433 };
431 434
432 } // namespace content 435 } // namespace content
433 436
434 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 437 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698