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

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: 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void MediaStreamDispatcherHost::OnGenerateStream( 74 void MediaStreamDispatcherHost::OnGenerateStream(
75 int render_view_id, 75 int render_view_id,
76 int page_request_id, 76 int page_request_id,
77 const media_stream::StreamOptions& components, 77 const media_stream::StreamOptions& components,
78 const std::string& security_origin) { 78 const std::string& security_origin) {
79 DVLOG(1) << "MediaStreamDispatcherHost::OnGenerateStream(" 79 DVLOG(1) << "MediaStreamDispatcherHost::OnGenerateStream("
80 << render_view_id << ", " 80 << render_view_id << ", "
81 << page_request_id << ", [ " 81 << page_request_id << ", [ "
82 << (components.audio ? "audio " : "") 82 << (components.audio ? "audio " : "")
83 << ((components.video_option & 83 << (components.video ? "video " : "")
84 StreamOptions::kFacingUser) ?
85 "video_facing_user " : "")
86 << ((components.video_option &
87 StreamOptions::kFacingEnvironment) ?
88 "video_facing_environment " : "")
89 << "], " 84 << "], "
90 << security_origin << ")"; 85 << security_origin << ")";
91 86
92 std::string label; 87 std::string label;
93 manager()->GenerateStream(this, render_process_id_, render_view_id, 88 manager()->GenerateStream(this, render_process_id_, render_view_id,
94 components, security_origin, &label); 89 components, security_origin, &label);
95 DCHECK(!label.empty()); 90 DCHECK(!label.empty());
96 streams_[label] = StreamRequest(render_view_id, page_request_id); 91 streams_[label] = StreamRequest(render_view_id, page_request_id);
97 } 92 }
98 93
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 StreamMap::iterator it = streams_.find(label); 255 StreamMap::iterator it = streams_.find(label);
261 DCHECK(it != streams_.end()); 256 DCHECK(it != streams_.end());
262 StreamRequest request = it->second; 257 StreamRequest request = it->second;
263 streams_.erase(it); 258 streams_.erase(it);
264 259
265 Send(new MediaStreamMsg_DeviceOpenFailed(request.render_view_id, 260 Send(new MediaStreamMsg_DeviceOpenFailed(request.render_view_id,
266 request.page_request_id)); 261 request.page_request_id));
267 } 262 }
268 263
269 } // namespace media_stream 264 } // namespace media_stream
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698