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

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

Issue 140633004: Reland CL to implement browser-side logging to WebRtc log. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: This is the original CL, untouched Created 6 years, 10 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 | Annotate | Revision Log
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/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
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 // Sends log messages to the render processes making device requests, to be
189 // used by the webrtcLoggingPrivate API if requested.
190 void AddLogMessageOnUIThread(const std::string& message);
191
192 // Adds |message| to native logs for outstanding device requests, for use by
193 // render processes requesting logging from webrtcLoggingPrivate API. Safe to
194 // call from any thread.
195 static void SendMessageToNativeLog(const std::string& message);
196
188 protected: 197 protected:
189 // Used for testing. 198 // Used for testing.
190 MediaStreamManager(); 199 MediaStreamManager();
191 200
192 private: 201 private:
193 // Contains all data needed to keep track of requests. 202 // Contains all data needed to keep track of requests.
194 class DeviceRequest; 203 class DeviceRequest;
195 204
196 // Cache enumerated device list. 205 // Cache enumerated device list.
197 struct EnumerationCache { 206 struct EnumerationCache {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 357
349 bool use_fake_ui_; 358 bool use_fake_ui_;
350 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; 359 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
351 360
352 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 361 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
353 }; 362 };
354 363
355 } // namespace content 364 } // namespace content
356 365
357 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 366 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698