Chromium Code Reviews| Index: content/public/browser/web_contents_media_capture_id.h |
| diff --git a/content/public/browser/web_contents_media_capture_id.h b/content/public/browser/web_contents_media_capture_id.h |
| index 84d91dbe7da4595ef63eed60a67af8bf504e93e2..e159eeb23b031a5f863254ef7ab36c864455dd1a 100644 |
| --- a/content/public/browser/web_contents_media_capture_id.h |
| +++ b/content/public/browser/web_contents_media_capture_id.h |
| @@ -21,10 +21,12 @@ struct CONTENT_EXPORT WebContentsMediaCaptureId { |
| WebContentsMediaCaptureId(int render_process_id, |
| int main_render_frame_id, |
| - bool enable_auto_throttling) |
| + bool enable_auto_throttling, |
| + bool mute_source) |
| : render_process_id(render_process_id), |
| main_render_frame_id(main_render_frame_id), |
| - enable_auto_throttling(enable_auto_throttling) {} |
| + enable_auto_throttling(enable_auto_throttling), |
| + mute_source(mute_source) {} |
| bool operator<(const WebContentsMediaCaptureId& other) const; |
| bool operator==(const WebContentsMediaCaptureId& other) const; |
| @@ -39,6 +41,7 @@ struct CONTENT_EXPORT WebContentsMediaCaptureId { |
| int main_render_frame_id = MSG_ROUTING_NONE; |
| bool enable_auto_throttling = false; |
| + bool mute_source = false; |
| // Create WebContentsMediaCaptureId based on a string. |
| static WebContentsMediaCaptureId Parse(const std::string& str); |
| @@ -52,9 +55,15 @@ struct CONTENT_EXPORT WebContentsMediaCaptureId { |
| int* render_process_id, |
| int* main_render_frame_id); |
| - // Parses the media stream request |device_id| and returns true if both 1) the |
| - // format is valid, and 2) the throttling option is set to auto. |
| - static bool IsAutoThrottlingOptionSet(const std::string& device_id); |
| + // Parses the media stream request |device_id| and returns true if the |
| + // format is valid. |*auto_throttling| will be stored whether the |device_id| |
| + // indicated auto throttling. |*mute_source| will stored whether |device_id| |
| + // requests us to mute the source audio during sharing. |
| + // The caller can pass nullptr for either |auto_throttling| or |mute_source|, |
| + // if the value is uninteresting. |
| + static bool ExtractOptions(const std::string& device_id, |
|
miu
2016/09/07 21:10:03
Looking at the calls to this function, only one of
qiangchen
2016/09/09 23:32:08
Done.
|
| + bool* auto_throttling, |
| + bool* mute_source); |
| }; |
| } // namespace content |