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

Unified Diff: chrome/browser/media/desktop_streams_registry.cc

Issue 1503563004: Desktop chrome tab capture-chooseDesktopMedia() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/desktop_streams_registry.cc
diff --git a/chrome/browser/media/desktop_streams_registry.cc b/chrome/browser/media/desktop_streams_registry.cc
index bd21240cdc56f3117fc2fe2f0a1e2052ef5cd7cd..eed4c513b5493de9d9d545e9d3da9bc8ee05e676 100644
--- a/chrome/browser/media/desktop_streams_registry.cc
+++ b/chrome/browser/media/desktop_streams_registry.cc
@@ -39,6 +39,11 @@ std::string DesktopStreamsRegistry::RegisterStream(
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
std::string id = GenerateRandomStreamId();
+
+ // Give the ability of identify tab type from id.
+ if (source.type == content::DesktopMediaID::TYPE_TAB)
+ id = source.ToString();
miu 2015/12/08 01:54:38 This is a security violation. If you need this in
GeorgeZ 2015/12/09 19:36:37 I will remove this one. I remembered this change i
+
DCHECK(approved_streams_.find(id) == approved_streams_.end());
ApprovedDesktopMediaStream& stream = approved_streams_[id];
stream.render_process_id = render_process_id;

Powered by Google App Engine
This is Rietveld 408576698