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

Side by Side Diff: content/browser/renderer_host/media/media_stream_dispatcher_host.cc

Issue 10912004: Begin adding support for tab mirroring via the MediaStream audio/video capturing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add CONTENT_EXPORT to resolve linker issues on components builds. Also, IWYU. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" 5 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h"
6 6
7 #include "content/browser/browser_main_loop.h" 7 #include "content/browser/browser_main_loop.h"
8 #include "content/common/media/media_stream_messages.h" 8 #include "content/common/media/media_stream_messages.h"
9 #include "content/common/media/media_stream_options.h" 9 #include "content/common/media/media_stream_options.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 DCHECK(streams_.empty()); 157 DCHECK(streams_.empty());
158 } 158 }
159 159
160 void MediaStreamDispatcherHost::OnGenerateStream( 160 void MediaStreamDispatcherHost::OnGenerateStream(
161 int render_view_id, 161 int render_view_id,
162 int page_request_id, 162 int page_request_id,
163 const media_stream::StreamOptions& components, 163 const media_stream::StreamOptions& components,
164 const GURL& security_origin) { 164 const GURL& security_origin) {
165 DVLOG(1) << "MediaStreamDispatcherHost::OnGenerateStream(" 165 DVLOG(1) << "MediaStreamDispatcherHost::OnGenerateStream("
166 << render_view_id << ", " 166 << render_view_id << ", "
167 << page_request_id << ", [ " 167 << page_request_id << ", ["
168 << (components.audio ? "audio " : "") 168 << " audio:" << components.audio_type
169 << (components.video ? "video " : "") 169 << " video:" << components.video_type
170 << "], " 170 << " ], "
171 << security_origin.spec() << ")"; 171 << security_origin.spec() << ")";
172 172
173 std::string label; 173 std::string label;
174 GetManager()->GenerateStream(this, render_process_id_, render_view_id, 174 GetManager()->GenerateStream(this, render_process_id_, render_view_id,
175 components, security_origin, &label); 175 components, security_origin, &label);
176 DCHECK(!label.empty()); 176 DCHECK(!label.empty());
177 streams_[label] = StreamRequest(render_view_id, page_request_id); 177 streams_[label] = StreamRequest(render_view_id, page_request_id);
178 } 178 }
179 179
180 void MediaStreamDispatcherHost::OnCancelGenerateStream(int render_view_id, 180 void MediaStreamDispatcherHost::OnCancelGenerateStream(int render_view_id,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 device_id, type, security_origin, &label); 237 device_id, type, security_origin, &label);
238 DCHECK(!label.empty()); 238 DCHECK(!label.empty());
239 streams_[label] = StreamRequest(render_view_id, page_request_id); 239 streams_[label] = StreamRequest(render_view_id, page_request_id);
240 } 240 }
241 241
242 MediaStreamManager* MediaStreamDispatcherHost::GetManager() { 242 MediaStreamManager* MediaStreamDispatcherHost::GetManager() {
243 return BrowserMainLoop::GetMediaStreamManager(); 243 return BrowserMainLoop::GetMediaStreamManager();
244 } 244 }
245 245
246 } // namespace media_stream 246 } // namespace media_stream
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698