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

Side by Side Diff: content/renderer/media/video_capture_impl.h

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 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 // VideoCaptureImpl represents a capture device in renderer process. It provides 5 // VideoCaptureImpl represents a capture device in renderer process. It provides
6 // interfaces for clients to Start/Stop capture. It also communicates to clients 6 // interfaces for clients to Start/Stop capture. It also communicates to clients
7 // when buffer is ready, state of capture device is changed. 7 // when buffer is ready, state of capture device is changed.
8 8
9 // VideoCaptureImpl is also a delegate of VideoCaptureMessageFilter which relays 9 // VideoCaptureImpl is also a delegate of VideoCaptureMessageFilter which relays
10 // operation of a capture device to the browser process and receives responses 10 // operation of a capture device to the browser process and receives responses
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 // The device's first captured frame timestamp sent from browser process side. 163 // The device's first captured frame timestamp sent from browser process side.
164 base::TimeTicks first_frame_timestamp_; 164 base::TimeTicks first_frame_timestamp_;
165 165
166 bool suspended_; 166 bool suspended_;
167 VideoCaptureState state_; 167 VideoCaptureState state_;
168 168
169 // WeakPtrFactory pointing back to |this| object, for use with 169 // WeakPtrFactory pointing back to |this| object, for use with
170 // media::VideoFrames constructed in OnBufferReceived() from buffers cached 170 // media::VideoFrames constructed in OnBufferReceived() from buffers cached
171 // in |client_buffers_|. 171 // in |client_buffers_|.
172 base::WeakPtrFactory<VideoCaptureImpl> weak_this_factory_; 172 // NOTE: Weak pointers must be invalidated before all other member variables.
173 base::WeakPtrFactory<VideoCaptureImpl> weak_factory_;
173 174
174 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); 175 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl);
175 }; 176 };
176 177
177 } // namespace content 178 } // namespace content
178 179
179 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ 180 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_encoder.cc ('k') | content/renderer/media/video_capture_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698