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

Side by Side Diff: content/renderer/media/user_media_client_impl.cc

Issue 1918173002: Add support for device-change notifications to MediaStreamDispatcher and MediaStreamDispatcherHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary comment Created 4 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/renderer/media/user_media_client_impl.h" 5 #include "content/renderer/media/user_media_client_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 << request_id << ", " << label << ")"; 763 << request_id << ", " << label << ")";
764 NOTIMPLEMENTED(); 764 NOTIMPLEMENTED();
765 } 765 }
766 766
767 void UserMediaClientImpl::OnDeviceOpenFailed(int request_id) { 767 void UserMediaClientImpl::OnDeviceOpenFailed(int request_id) {
768 DVLOG(1) << "UserMediaClientImpl::VideoDeviceOpenFailed(" 768 DVLOG(1) << "UserMediaClientImpl::VideoDeviceOpenFailed("
769 << request_id << ")"; 769 << request_id << ")";
770 NOTIMPLEMENTED(); 770 NOTIMPLEMENTED();
771 } 771 }
772 772
773 void UserMediaClientImpl::OnDevicesChanged() {
774 DVLOG(1) << "UserMediaClientImpl::OnDevicesChanged()";
775 NOTIMPLEMENTED();
776 }
777
773 void UserMediaClientImpl::GetUserMediaRequestSucceeded( 778 void UserMediaClientImpl::GetUserMediaRequestSucceeded(
774 const blink::WebMediaStream& stream, 779 const blink::WebMediaStream& stream,
775 blink::WebUserMediaRequest request_info) { 780 blink::WebUserMediaRequest request_info) {
776 // Completing the getUserMedia request can lead to that the RenderFrame and 781 // Completing the getUserMedia request can lead to that the RenderFrame and
777 // the UserMediaClientImpl is destroyed if the JavaScript code request the 782 // the UserMediaClientImpl is destroyed if the JavaScript code request the
778 // frame to be destroyed within the scope of the callback. Therefore, 783 // frame to be destroyed within the scope of the callback. Therefore,
779 // post a task to complete the request with a clean stack. 784 // post a task to complete the request with a clean stack.
780 base::ThreadTaskRunnerHandle::Get()->PostTask( 785 base::ThreadTaskRunnerHandle::Get()->PostTask(
781 FROM_HERE, 786 FROM_HERE,
782 base::Bind(&UserMediaClientImpl::DelayedGetUserMediaRequestSucceeded, 787 base::Bind(&UserMediaClientImpl::DelayedGetUserMediaRequestSucceeded,
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 return; 1148 return;
1144 } 1149 }
1145 } 1150 }
1146 } 1151 }
1147 1152
1148 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { 1153 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const {
1149 return !sources_waiting_for_callback_.empty(); 1154 return !sources_waiting_for_callback_.empty();
1150 } 1155 }
1151 1156
1152 } // namespace content 1157 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698