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

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

Issue 132233058: Revert 247164 "Implement browser-side logging to WebRtc log" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
197 protected: 188 protected:
198 // Used for testing. 189 // Used for testing.
199 MediaStreamManager(); 190 MediaStreamManager();
200 191
201 private: 192 private:
202 // Contains all data needed to keep track of requests. 193 // Contains all data needed to keep track of requests.
203 class DeviceRequest; 194 class DeviceRequest;
204 195
205 // Cache enumerated device list. 196 // Cache enumerated device list.
206 struct EnumerationCache { 197 struct EnumerationCache {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 348
358 bool use_fake_ui_; 349 bool use_fake_ui_;
359 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_; 350 scoped_ptr<FakeMediaStreamUIProxy> fake_ui_;
360 351
361 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager); 352 DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
362 }; 353 };
363 354
364 } // namespace content 355 } // namespace content
365 356
366 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_ 357 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698