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

Unified Diff: content/browser/renderer_host/media/media_stream_manager.h

Issue 57913002: Refactor how the DeviceMonitor is started. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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: content/browser/renderer_host/media/media_stream_manager.h
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index c87c8c5ec4faee65cab7eceb10a62b9a3be628a3..7345d105c7973062b209ecb956057b61763ae4de 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -138,17 +138,8 @@ class CONTENT_EXPORT MediaStreamManager
MediaStreamType type,
const GURL& security_origin);
- // Implements MediaStreamProviderListener.
- virtual void Opened(MediaStreamType stream_type,
- int capture_session_id) OVERRIDE;
- virtual void Closed(MediaStreamType stream_type,
- int capture_session_id) OVERRIDE;
- virtual void DevicesEnumerated(MediaStreamType stream_type,
- const StreamDeviceInfoArray& devices) OVERRIDE;
-
- // Implements base::SystemMonitor::DevicesChangedObserver.
- virtual void OnDevicesChanged(
- base::SystemMonitor::DeviceType device_type) OVERRIDE;
+ // Start the device monitor.
+ void StartMonitoring();
// Used by unit test to make sure fake devices are used instead of a real
// devices, which is needed for server based testing or certain tests (which
@@ -201,6 +192,18 @@ class CONTENT_EXPORT MediaStreamManager
// thread and registers this as a listener with the device managers.
void InitializeDeviceManagersOnIOThread();
+ // Implements MediaStreamProviderListener.
+ virtual void Opened(MediaStreamType stream_type,
+ int capture_session_id) OVERRIDE;
+ virtual void Closed(MediaStreamType stream_type,
+ int capture_session_id) OVERRIDE;
+ virtual void DevicesEnumerated(MediaStreamType stream_type,
+ const StreamDeviceInfoArray& devices) OVERRIDE;
+
+ // Implements base::SystemMonitor::DevicesChangedObserver.
+ virtual void OnDevicesChanged(
+ base::SystemMonitor::DeviceType device_type) OVERRIDE;
+
// Helper for sending up-to-date device lists to media observer when a
// capture device is plugged in or unplugged.
void NotifyDevicesChanged(MediaStreamType stream_type,
@@ -259,8 +262,7 @@ class CONTENT_EXPORT MediaStreamManager
void FinalizeEnumerateDevices(const std::string& label,
DeviceRequest* request);
- // Helpers to start and stop monitoring devices.
- void StartMonitoring();
+ // Helpers to stop monitoring devices.
void StopMonitoring();
bool TranslateRequestedSourceIdToDeviceId(DeviceRequest* request);

Powered by Google App Engine
This is Rietveld 408576698