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

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

Issue 10177008: Shift media_stream::StreamOptions to align with the new getUserMedia spec (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 7 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
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/common/media/media_stream_messages.h" 7 #include "content/common/media/media_stream_messages.h"
8 #include "content/common/media/media_stream_options.h" 8 #include "content/common/media/media_stream_options.h"
9 9
10 using content::BrowserMessageFilter; 10 using content::BrowserMessageFilter;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 void MediaStreamDispatcherHost::OnGenerateStream( 189 void MediaStreamDispatcherHost::OnGenerateStream(
190 int render_view_id, 190 int render_view_id,
191 int page_request_id, 191 int page_request_id,
192 const media_stream::StreamOptions& components, 192 const media_stream::StreamOptions& components,
193 const std::string& security_origin) { 193 const std::string& security_origin) {
194 DVLOG(1) << "MediaStreamDispatcherHost::OnGenerateStream(" 194 DVLOG(1) << "MediaStreamDispatcherHost::OnGenerateStream("
195 << render_view_id << ", " 195 << render_view_id << ", "
196 << page_request_id << ", [ " 196 << page_request_id << ", [ "
197 << (components.audio ? "audio " : "") 197 << (components.audio ? "audio " : "")
198 << ((components.video_option & 198 << (components.video ? "video " : "")
199 StreamOptions::kFacingUser) ?
200 "video_facing_user " : "")
201 << ((components.video_option &
202 StreamOptions::kFacingEnvironment) ?
203 "video_facing_environment " : "")
204 << "], " 199 << "], "
205 << security_origin << ")"; 200 << security_origin << ")";
206 201
207 std::string label; 202 std::string label;
208 manager()->GenerateStream(this, render_process_id_, render_view_id, 203 manager()->GenerateStream(this, render_process_id_, render_view_id,
209 components, security_origin, &label); 204 components, security_origin, &label);
210 DCHECK(!label.empty()); 205 DCHECK(!label.empty());
211 streams_[label] = StreamRequest(render_view_id, page_request_id); 206 streams_[label] = StreamRequest(render_view_id, page_request_id);
212 } 207 }
213 208
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 DCHECK(!label.empty()); 254 DCHECK(!label.empty());
260 streams_[label] = StreamRequest(render_view_id, page_request_id); 255 streams_[label] = StreamRequest(render_view_id, page_request_id);
261 } 256 }
262 257
263 MediaStreamManager* MediaStreamDispatcherHost::manager() { 258 MediaStreamManager* MediaStreamDispatcherHost::manager() {
264 return MediaStreamManager::GetForResourceContext( 259 return MediaStreamManager::GetForResourceContext(
265 resource_context_, audio_manager_); 260 resource_context_, audio_manager_);
266 } 261 }
267 262
268 } // namespace media_stream 263 } // namespace media_stream
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698