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 <algorithm> | 9 #include <algorithm> |
10 #include <utility> | 10 #include <utility> |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
944 media_stream_dispatcher_->StopStreamDevice(source_impl->device_info()); | 944 media_stream_dispatcher_->StopStreamDevice(source_impl->device_info()); |
945 | 945 |
946 source_impl->ResetSourceStoppedCallback(); | 946 source_impl->ResetSourceStoppedCallback(); |
947 source_impl->StopSource(); | 947 source_impl->StopSource(); |
948 } | 948 } |
949 | 949 |
950 const ::mojom::MediaDevicesDispatcherHostPtr& | 950 const ::mojom::MediaDevicesDispatcherHostPtr& |
951 UserMediaClientImpl::GetMediaDevicesDispatcher() { | 951 UserMediaClientImpl::GetMediaDevicesDispatcher() { |
952 if (!media_devices_dispatcher_) { | 952 if (!media_devices_dispatcher_) { |
953 render_frame()->GetRemoteInterfaces()->GetInterface( | 953 render_frame()->GetRemoteInterfaces()->GetInterface( |
954 mojo::GetProxy(&media_devices_dispatcher_)); | 954 mojo::MakeRequest(&media_devices_dispatcher_)); |
955 } | 955 } |
956 | 956 |
957 return media_devices_dispatcher_; | 957 return media_devices_dispatcher_; |
958 } | 958 } |
959 | 959 |
960 UserMediaClientImpl::UserMediaRequestInfo::UserMediaRequestInfo( | 960 UserMediaClientImpl::UserMediaRequestInfo::UserMediaRequestInfo( |
961 int request_id, | 961 int request_id, |
962 const blink::WebUserMediaRequest& request, | 962 const blink::WebUserMediaRequest& request, |
963 bool enable_automatic_output_device_selection) | 963 bool enable_automatic_output_device_selection) |
964 : request_id(request_id), | 964 : request_id(request_id), |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 | 1065 |
1066 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { | 1066 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { |
1067 return !sources_waiting_for_callback_.empty(); | 1067 return !sources_waiting_for_callback_.empty(); |
1068 } | 1068 } |
1069 | 1069 |
1070 void UserMediaClientImpl::OnDestruct() { | 1070 void UserMediaClientImpl::OnDestruct() { |
1071 delete this; | 1071 delete this; |
1072 } | 1072 } |
1073 | 1073 |
1074 } // namespace content | 1074 } // namespace content |
OLD | NEW |