| 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 eefab6bdcb2087ddfc4890a8f7b1c93a3691050f..88f02e1f36cdfd0a2c9cdb940826bcb1aa11ffe1 100644
|
| --- a/content/browser/renderer_host/media/media_stream_manager.h
|
| +++ b/content/browser/renderer_host/media/media_stream_manager.h
|
| @@ -24,6 +24,7 @@
|
| #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MEDIA_STREAM_MANAGER_H_
|
|
|
| #include <map>
|
| +#include <set>
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| @@ -185,6 +186,15 @@ class CONTENT_EXPORT MediaStreamManager
|
| // too late. (see http://crbug.com/247525#c14).
|
| virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
|
|
|
| + // Sends log messages to the render processes making device requests, to be
|
| + // used by the webrtcLoggingPrivate API if requested.
|
| + void AddLogMessageOnIOThread(const std::string& message);
|
| +
|
| + // Adds |message| to native logs for outstanding device requests, for use by
|
| + // render processes requesting logging from webrtcLoggingPrivate API. Safe to
|
| + // call from any thread.
|
| + static void SendMessageToNativeLog(const std::string& message);
|
| +
|
| protected:
|
| // Used for testing.
|
| MediaStreamManager();
|
| @@ -310,6 +320,12 @@ class CONTENT_EXPORT MediaStreamManager
|
| void TranslateDeviceIdToSourceId(DeviceRequest* request,
|
| MediaStreamDevice* device);
|
|
|
| + // Helper method that sends log messages to the render processes in
|
| + // |render_process_ids|, to be used by the webrtcLoggingPrivate API if
|
| + // requested.
|
| + void AddLogMessageOnUIThread(const std::set<int>& render_process_ids,
|
| + const std::string& message);
|
| +
|
| // Finds and returns the device id corresponding to the given
|
| // |source_id|. Returns true if there was a raw device id that matched the
|
| // given |source_id|, false if nothing matched it.
|
| @@ -339,7 +355,7 @@ class CONTENT_EXPORT MediaStreamManager
|
| // AudioInputDeviceManager, in order to only enumerate when necessary.
|
| int active_enumeration_ref_count_[NUM_MEDIA_TYPES];
|
|
|
| - // All non-closed request.
|
| + // All non-closed request. Must be accessed on IO thread.
|
| DeviceRequests requests_;
|
|
|
| // Hold a pointer to the IO loop to check we delete the device thread and
|
|
|