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

Side by Side Diff: media/filters/renderer_impl.h

Issue 598023004: [src/media] Declaring the weak_ptr_factory in proper order in cast,mojo and filters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MEDIA_FILTERS_RENDERER_IMPL_H_ 5 #ifndef MEDIA_FILTERS_RENDERER_IMPL_H_
6 #define MEDIA_FILTERS_RENDERER_IMPL_H_ 6 #define MEDIA_FILTERS_RENDERER_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 BufferingState audio_buffering_state_; 144 BufferingState audio_buffering_state_;
145 BufferingState video_buffering_state_; 145 BufferingState video_buffering_state_;
146 146
147 // Whether we've received the audio/video ended events. 147 // Whether we've received the audio/video ended events.
148 bool audio_ended_; 148 bool audio_ended_;
149 bool video_ended_; 149 bool video_ended_;
150 150
151 bool underflow_disabled_for_testing_; 151 bool underflow_disabled_for_testing_;
152 bool clockless_video_playback_enabled_for_testing_; 152 bool clockless_video_playback_enabled_for_testing_;
153 153
154 base::WeakPtr<RendererImpl> weak_this_;
155
154 // NOTE: Weak pointers must be invalidated before all other member variables. 156 // NOTE: Weak pointers must be invalidated before all other member variables.
155 base::WeakPtrFactory<RendererImpl> weak_factory_; 157 base::WeakPtrFactory<RendererImpl> weak_factory_;
xhwang 2014/09/29 16:34:02 The order doesn't really matter here. But logicall
156 base::WeakPtr<RendererImpl> weak_this_;
157 158
158 DISALLOW_COPY_AND_ASSIGN(RendererImpl); 159 DISALLOW_COPY_AND_ASSIGN(RendererImpl);
159 }; 160 };
160 161
161 } // namespace media 162 } // namespace media
162 163
163 #endif // MEDIA_FILTERS_RENDERER_IMPL_H_ 164 #endif // MEDIA_FILTERS_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698