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

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

Issue 11759020: Implement a TODO in the media code: Change a "const MediaStreamRequest*" arg in various APIs to "co… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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_ui_controller.h" 5 #include "content/browser/renderer_host/media/media_stream_ui_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Send the permission request to the web contents. 97 // Send the permission request to the web contents.
98 RenderViewHostImpl* host = RenderViewHostImpl::FromID( 98 RenderViewHostImpl* host = RenderViewHostImpl::FromID(
99 request.render_process_id, request.render_view_id); 99 request.render_process_id, request.render_view_id);
100 100
101 // Tab may have gone away. 101 // Tab may have gone away.
102 if (!host || !host->GetDelegate()) { 102 if (!host || !host->GetDelegate()) {
103 callback.Run(MediaStreamDevices()); 103 callback.Run(MediaStreamDevices());
104 return; 104 return;
105 } 105 }
106 106
107 host->GetDelegate()->RequestMediaAccessPermission(&request, callback); 107 host->GetDelegate()->RequestMediaAccessPermission(request, callback);
108 } 108 }
109 109
110 } // namespace 110 } // namespace
111 111
112 MediaStreamUIController::MediaStreamUIController(SettingsRequester* requester) 112 MediaStreamUIController::MediaStreamUIController(SettingsRequester* requester)
113 : requester_(requester), 113 : requester_(requester),
114 use_fake_ui_(false), 114 use_fake_ui_(false),
115 weak_ptr_factory_(this) { 115 weak_ptr_factory_(this) {
116 DCHECK(requester_); 116 DCHECK(requester_);
117 } 117 }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 } 338 }
339 339
340 BrowserThread::PostTask( 340 BrowserThread::PostTask(
341 BrowserThread::IO, FROM_HERE, 341 BrowserThread::IO, FROM_HERE,
342 base::Bind(&MediaStreamUIController::PostResponse, 342 base::Bind(&MediaStreamUIController::PostResponse,
343 weak_ptr_factory_.GetWeakPtr(), label, devices_to_use)); 343 weak_ptr_factory_.GetWeakPtr(), label, devices_to_use));
344 } 344 }
345 345
346 } // namespace content 346 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698