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

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

Issue 180633008: Add different error codes for getUserMedia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comments Created 6 years, 9 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 "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 18 matching lines...) Expand all
29 const StreamDeviceInfoArray& video_devices) { 29 const StreamDeviceInfoArray& video_devices) {
30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
31 DVLOG(1) << "MediaStreamDispatcherHost::StreamGenerated(" 31 DVLOG(1) << "MediaStreamDispatcherHost::StreamGenerated("
32 << ", {label = " << label << "})"; 32 << ", {label = " << label << "})";
33 33
34 Send(new MediaStreamMsg_StreamGenerated( 34 Send(new MediaStreamMsg_StreamGenerated(
35 render_view_id, page_request_id, label, audio_devices, 35 render_view_id, page_request_id, label, audio_devices,
36 video_devices)); 36 video_devices));
37 } 37 }
38 38
39 void MediaStreamDispatcherHost::StreamGenerationFailed(int render_view_id, 39 void MediaStreamDispatcherHost::StreamGenerationFailed(
40 int page_request_id) { 40 int render_view_id,
41 int page_request_id,
42 content::MediaStreamRequestResult result) {
41 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
42 DVLOG(1) << "MediaStreamDispatcherHost::StreamGenerationFailed(" 44 DVLOG(1) << "MediaStreamDispatcherHost::StreamGenerationFailed("
43 << ", {page_request_id = " << page_request_id << "})"; 45 << ", {page_request_id = " << page_request_id << "}"
46 << ", { result= " << result << "})";
44 47
45 48
46 Send(new MediaStreamMsg_StreamGenerationFailed(render_view_id, 49 Send(new MediaStreamMsg_StreamGenerationFailed(render_view_id,
47 page_request_id)); 50 page_request_id,
51 result));
48 } 52 }
49 53
50 void MediaStreamDispatcherHost::DeviceStopped(int render_view_id, 54 void MediaStreamDispatcherHost::DeviceStopped(int render_view_id,
51 const std::string& label, 55 const std::string& label,
52 const StreamDeviceInfo& device) { 56 const StreamDeviceInfo& device) {
53 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 57 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
54 DVLOG(1) << "MediaStreamDispatcherHost::DeviceStopped(" 58 DVLOG(1) << "MediaStreamDispatcherHost::DeviceStopped("
55 << "{label = " << label << "}, " 59 << "{label = " << label << "}, "
56 << "{type = " << device.device.type << "}, " 60 << "{type = " << device.device.type << "}, "
57 << "{device_id = " << device.device.id << "})"; 61 << "{device_id = " << device.device.id << "})";
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int render_view_id, 207 int render_view_id,
204 const std::string& label) { 208 const std::string& label) {
205 DVLOG(1) << "MediaStreamDispatcherHost::OnCloseDevice(" 209 DVLOG(1) << "MediaStreamDispatcherHost::OnCloseDevice("
206 << render_view_id << ", " 210 << render_view_id << ", "
207 << label << ")"; 211 << label << ")";
208 212
209 media_stream_manager_->CancelRequest(label); 213 media_stream_manager_->CancelRequest(label);
210 } 214 }
211 215
212 } // namespace content 216 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698