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

Unified Diff: content/public/browser/web_contents_media_capture_id.h

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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: 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..7c7b3df4f6aecc69c7877122a7d974487142926f 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,22 +41,13 @@ 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);
-
- // Check whether the device id indicates that this is a web contents stream.
- static bool IsWebContentsDeviceId(const std::string& device_id);
-
- // Function to extract the target render frame id's from a media stream
- // request's device id.
- static bool ExtractTabCaptureTarget(const std::string& device_id,
- 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);
+ // Return false if the input string does not represent a
+ // WebContentsMediaCaptureId.
+ static bool TryParse(const std::string& str,
miu 2016/09/12 23:13:12 nit suggestion: Just "Parse()". It's a common patt
qiangchen 2016/09/13 21:46:57 Done.
+ WebContentsMediaCaptureId* output_id);
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698