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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | content/renderer/media/video_capture_impl_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index 9fd3601ba8edbc84af52e984c6a04f8d23943e96..01f117df3bc91733a08bda3e0a4a77967d844be9 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -50,7 +50,7 @@ VideoCaptureImpl::VideoCaptureImpl(
session_id_(session_id),
suspended_(false),
state_(VIDEO_CAPTURE_STATE_STOPPED),
- weak_this_factory_(this) {
+ weak_factory_(this) {
DCHECK(filter);
}
@@ -185,7 +185,7 @@ void VideoCaptureImpl::StopCaptureOnIOThread(
DVLOG(1) << "StopCapture: No more client, stopping ...";
StopDevice();
client_buffers_.clear();
- weak_this_factory_.InvalidateWeakPtrs();
+ weak_factory_.InvalidateWeakPtrs();
}
}
@@ -277,7 +277,7 @@ void VideoCaptureImpl::OnBufferReceived(int buffer_id,
timestamp - first_frame_timestamp_,
media::BindToCurrentLoop(base::Bind(
&VideoCaptureImpl::OnClientBufferFinished,
- weak_this_factory_.GetWeakPtr(),
+ weak_factory_.GetWeakPtr(),
buffer_id,
buffer,
base::Passed(scoped_ptr<gpu::MailboxHolder>().Pass()))));
@@ -309,7 +309,7 @@ void VideoCaptureImpl::OnMailboxBufferReceived(
make_scoped_ptr(new gpu::MailboxHolder(mailbox_holder)),
media::BindToCurrentLoop(
base::Bind(&VideoCaptureImpl::OnClientBufferFinished,
- weak_this_factory_.GetWeakPtr(),
+ weak_factory_.GetWeakPtr(),
buffer_id,
scoped_refptr<ClientBuffer>())),
last_frame_format_.frame_size,
@@ -341,7 +341,7 @@ void VideoCaptureImpl::OnStateChanged(VideoCaptureState state) {
state_ = VIDEO_CAPTURE_STATE_STOPPED;
DVLOG(1) << "OnStateChanged: stopped!, device_id = " << device_id_;
client_buffers_.clear();
- weak_this_factory_.InvalidateWeakPtrs();
+ weak_factory_.InvalidateWeakPtrs();
if (!clients_.empty() || !clients_pending_on_restart_.empty())
RestartCapture();
break;
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | content/renderer/media/video_capture_impl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698