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

Side by Side Diff: media/cast/cast_sender_impl.h

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef MEDIA_CAST_CAST_SENDER_IMPL_H_ 4 #ifndef MEDIA_CAST_CAST_SENDER_IMPL_H_
5 #define MEDIA_CAST_CAST_SENDER_IMPL_H_ 5 #define MEDIA_CAST_CAST_SENDER_IMPL_H_
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "media/cast/audio_sender/audio_sender.h" 9 #include "media/cast/audio_sender/audio_sender.h"
10 #include "media/cast/cast_config.h" 10 #include "media/cast/cast_config.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 scoped_ptr<AudioSender> audio_sender_; 50 scoped_ptr<AudioSender> audio_sender_;
51 scoped_ptr<VideoSender> video_sender_; 51 scoped_ptr<VideoSender> video_sender_;
52 scoped_refptr<AudioFrameInput> audio_frame_input_; 52 scoped_refptr<AudioFrameInput> audio_frame_input_;
53 scoped_refptr<VideoFrameInput> video_frame_input_; 53 scoped_refptr<VideoFrameInput> video_frame_input_;
54 scoped_refptr<CastEnvironment> cast_environment_; 54 scoped_refptr<CastEnvironment> cast_environment_;
55 // The transport sender is owned by the owner of the CastSender, and should be 55 // The transport sender is owned by the owner of the CastSender, and should be
56 // valid throughout the lifetime of the CastSender. 56 // valid throughout the lifetime of the CastSender.
57 transport::CastTransportSender* const transport_sender_; 57 transport::CastTransportSender* const transport_sender_;
58 uint32 ssrc_of_audio_sender_; 58 uint32 ssrc_of_audio_sender_;
59 uint32 ssrc_of_video_sender_; 59 uint32 ssrc_of_video_sender_;
60
61 // NOTE: This must always be last so it's invalidated before other member
62 // variables might be accessed.
60 base::WeakPtrFactory<CastSenderImpl> weak_factory_; 63 base::WeakPtrFactory<CastSenderImpl> weak_factory_;
61 64
62 DISALLOW_COPY_AND_ASSIGN(CastSenderImpl); 65 DISALLOW_COPY_AND_ASSIGN(CastSenderImpl);
63 }; 66 };
64 67
65 } // namespace cast 68 } // namespace cast
66 } // namespace media 69 } // namespace media
67 70
68 #endif // MEDIA_CAST_CAST_SENDER_IMPL_H_ 71 #endif // MEDIA_CAST_CAST_SENDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698