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

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

Issue 9903014: Using WeakPtr for requests to MediaStreamDispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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/renderer/media/media_stream_impl.h" 5 #include "content/renderer/media/media_stream_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 << (audio ? "audio" : "") 170 << (audio ? "audio" : "")
171 << (user_media_request.video() ? " video" : "") << "], " 171 << (user_media_request.video() ? " video" : "") << "], "
172 << security_origin << ")"; 172 << security_origin << ")";
173 173
174 user_media_requests_.insert( 174 user_media_requests_.insert(
175 std::pair<int, WebKit::WebUserMediaRequest>( 175 std::pair<int, WebKit::WebUserMediaRequest>(
176 request_id, user_media_request)); 176 request_id, user_media_request));
177 177
178 media_stream_dispatcher_->GenerateStream( 178 media_stream_dispatcher_->GenerateStream(
179 request_id, 179 request_id,
180 this, 180 AsWeakPtr(),
181 media_stream::StreamOptions(audio, video_option), 181 media_stream::StreamOptions(audio, video_option),
182 security_origin); 182 security_origin);
183 } 183 }
184 184
185 void MediaStreamImpl::cancelUserMediaRequest( 185 void MediaStreamImpl::cancelUserMediaRequest(
186 const WebKit::WebUserMediaRequest& user_media_request) { 186 const WebKit::WebUserMediaRequest& user_media_request) {
187 DCHECK(CalledOnValidThread()); 187 DCHECK(CalledOnValidThread());
188 // TODO(grunell): Implement. 188 // TODO(grunell): Implement.
189 NOTIMPLEMENTED(); 189 NOTIMPLEMENTED();
190 } 190 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 MediaStreamImpl::VideoRendererWrapper::VideoRendererWrapper() {} 477 MediaStreamImpl::VideoRendererWrapper::VideoRendererWrapper() {}
478 478
479 MediaStreamImpl::VideoRendererWrapper::~VideoRendererWrapper() {} 479 MediaStreamImpl::VideoRendererWrapper::~VideoRendererWrapper() {}
480 480
481 void MediaStreamImpl::VideoRendererWrapper::SetVideoDecoder( 481 void MediaStreamImpl::VideoRendererWrapper::SetVideoDecoder(
482 RTCVideoDecoder* decoder) { 482 RTCVideoDecoder* decoder) {
483 rtc_video_decoder_ = decoder; 483 rtc_video_decoder_ = decoder;
484 } 484 }
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_impl.h ('k') | content/renderer/media/mock_media_stream_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698