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

Unified Diff: chrome/browser/media/media_capture_devices_dispatcher.h

Issue 14197014: Add TestBrowserThreadBundle into RenderViewHostTestHarness. Kill some unnecessary real threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media/media_capture_devices_dispatcher.h
diff --git a/chrome/browser/media/media_capture_devices_dispatcher.h b/chrome/browser/media/media_capture_devices_dispatcher.h
index c9fb31c77f05be7d0474058679858595b685ef18..0a704d437c871ef65cea8c7e842aba1cae787ec2 100644
--- a/chrome/browser/media/media_capture_devices_dispatcher.h
+++ b/chrome/browser/media/media_capture_devices_dispatcher.h
@@ -91,6 +91,11 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
bool video,
content::MediaStreamDevices* devices);
+ // Unittests that do not require actual device enumeration should call this
+ // API on the singleton. It is safe to call this multiple times on the
+ // signleton.
+ void DisableDeviceEnumerationForTesting();
+
// Overridden from content::MediaObserver:
virtual void OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE;
@@ -150,6 +155,9 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver {
// Only accessed on UI thread.
bool devices_enumerated_;
+ // Flag used by unittests to disable device enumeration.
+ bool is_device_enumeration_disabled_;
+
scoped_refptr<MediaStreamCaptureIndicator> media_stream_capture_indicator_;
scoped_refptr<AudioStreamIndicator> audio_stream_indicator_;

Powered by Google App Engine
This is Rietveld 408576698