| OLD | NEW |
| 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 << request_id << ", " << label << ")"; | 767 << request_id << ", " << label << ")"; |
| 768 NOTIMPLEMENTED(); | 768 NOTIMPLEMENTED(); |
| 769 } | 769 } |
| 770 | 770 |
| 771 void UserMediaClientImpl::OnDeviceOpenFailed(int request_id) { | 771 void UserMediaClientImpl::OnDeviceOpenFailed(int request_id) { |
| 772 DVLOG(1) << "UserMediaClientImpl::VideoDeviceOpenFailed(" | 772 DVLOG(1) << "UserMediaClientImpl::VideoDeviceOpenFailed(" |
| 773 << request_id << ")"; | 773 << request_id << ")"; |
| 774 NOTIMPLEMENTED(); | 774 NOTIMPLEMENTED(); |
| 775 } | 775 } |
| 776 | 776 |
| 777 void UserMediaClientImpl::OnDevicesChanged() { |
| 778 DVLOG(1) << "UserMediaClientImpl::OnDevicesChanged()"; |
| 779 NOTIMPLEMENTED(); |
| 780 } |
| 781 |
| 777 void UserMediaClientImpl::GetUserMediaRequestSucceeded( | 782 void UserMediaClientImpl::GetUserMediaRequestSucceeded( |
| 778 const blink::WebMediaStream& stream, | 783 const blink::WebMediaStream& stream, |
| 779 blink::WebUserMediaRequest request_info) { | 784 blink::WebUserMediaRequest request_info) { |
| 780 // Completing the getUserMedia request can lead to that the RenderFrame and | 785 // Completing the getUserMedia request can lead to that the RenderFrame and |
| 781 // the UserMediaClientImpl is destroyed if the JavaScript code request the | 786 // the UserMediaClientImpl is destroyed if the JavaScript code request the |
| 782 // frame to be destroyed within the scope of the callback. Therefore, | 787 // frame to be destroyed within the scope of the callback. Therefore, |
| 783 // post a task to complete the request with a clean stack. | 788 // post a task to complete the request with a clean stack. |
| 784 base::ThreadTaskRunnerHandle::Get()->PostTask( | 789 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 785 FROM_HERE, | 790 FROM_HERE, |
| 786 base::Bind(&UserMediaClientImpl::DelayedGetUserMediaRequestSucceeded, | 791 base::Bind(&UserMediaClientImpl::DelayedGetUserMediaRequestSucceeded, |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 return; | 1156 return; |
| 1152 } | 1157 } |
| 1153 } | 1158 } |
| 1154 } | 1159 } |
| 1155 | 1160 |
| 1156 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1161 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
| 1157 return !sources_waiting_for_callback_.empty(); | 1162 return !sources_waiting_for_callback_.empty(); |
| 1158 } | 1163 } |
| 1159 | 1164 |
| 1160 } // namespace content | 1165 } // namespace content |
| OLD | NEW |