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

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

Issue 2377613002: Remove cancelMediaDevicesRequest dead code. (Closed)
Patch Set: Created 4 years, 2 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 MEDIA_DEVICE_VIDEO_CAPTURE, 323 MEDIA_DEVICE_VIDEO_CAPTURE,
324 security_origin); 324 security_origin);
325 325
326 media_stream_dispatcher_->EnumerateDevices( 326 media_stream_dispatcher_->EnumerateDevices(
327 audio_output_request_id, 327 audio_output_request_id,
328 weak_factory_.GetWeakPtr(), 328 weak_factory_.GetWeakPtr(),
329 MEDIA_DEVICE_AUDIO_OUTPUT, 329 MEDIA_DEVICE_AUDIO_OUTPUT,
330 security_origin); 330 security_origin);
331 } 331 }
332 332
333 void UserMediaClientImpl::cancelMediaDevicesRequest(
334 const blink::WebMediaDevicesRequest& media_devices_request) {
335 DCHECK(CalledOnValidThread());
336 MediaDevicesRequestInfo* request =
337 FindMediaDevicesRequestInfo(media_devices_request);
338 if (!request)
339 return;
340 CancelAndDeleteMediaDevicesRequest(request);
341 }
342
343 void UserMediaClientImpl::requestSources( 333 void UserMediaClientImpl::requestSources(
344 const blink::WebMediaStreamTrackSourcesRequest& sources_request) { 334 const blink::WebMediaStreamTrackSourcesRequest& sources_request) {
345 // We don't call UpdateWebRTCMethodCount() here to track the API count in UMA 335 // We don't call UpdateWebRTCMethodCount() here to track the API count in UMA
346 // stats. This is instead counted in MediaStreamTrack::getSources in blink. 336 // stats. This is instead counted in MediaStreamTrack::getSources in blink.
347 DCHECK(CalledOnValidThread()); 337 DCHECK(CalledOnValidThread());
348 338
349 int audio_input_request_id = g_next_request_id++; 339 int audio_input_request_id = g_next_request_id++;
350 int video_input_request_id = g_next_request_id++; 340 int video_input_request_id = g_next_request_id++;
351 341
352 // |sources_request| can't be mocked, so in tests it will be empty (the 342 // |sources_request| can't be mocked, so in tests it will be empty (the
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1176
1187 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const { 1177 bool UserMediaClientImpl::UserMediaRequestInfo::HasPendingSources() const {
1188 return !sources_waiting_for_callback_.empty(); 1178 return !sources_waiting_for_callback_.empty();
1189 } 1179 }
1190 1180
1191 void UserMediaClientImpl::OnDestruct() { 1181 void UserMediaClientImpl::OnDestruct() {
1192 delete this; 1182 delete this;
1193 } 1183 }
1194 1184
1195 } // namespace content 1185 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/user_media_client_impl.h ('k') | third_party/WebKit/Source/modules/mediastream/UserMediaClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698