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

Side by Side Diff: content/renderer/media/rtc_video_encoder.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 scoped_refptr<Impl> impl_; 93 scoped_refptr<Impl> impl_;
94 94
95 // We cannot immediately return error conditions to the WebRTC user of this 95 // We cannot immediately return error conditions to the WebRTC user of this
96 // class, as there is no error callback in the webrtc::VideoEncoder interface. 96 // class, as there is no error callback in the webrtc::VideoEncoder interface.
97 // Instead, we cache an error status here and return it the next time an 97 // Instead, we cache an error status here and return it the next time an
98 // interface entry point is called. 98 // interface entry point is called.
99 int32_t impl_status_; 99 int32_t impl_status_;
100 100
101 // Weak pointer factory for posting back VEA::Client notifications to 101 // Weak pointer factory for posting back VEA::Client notifications to
102 // RTCVideoEncoder. 102 // RTCVideoEncoder.
103 base::WeakPtrFactory<RTCVideoEncoder> weak_this_factory_; 103 // NOTE: Weak pointers must be invalidated before all other member variables.
104 base::WeakPtrFactory<RTCVideoEncoder> weak_factory_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder); 106 DISALLOW_COPY_AND_ASSIGN(RTCVideoEncoder);
106 }; 107 };
107 108
108 } // namespace content 109 } // namespace content
109 110
110 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_ 111 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | content/renderer/media/rtc_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698