OLD | NEW |
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_CAST_TEST_IN_PROCESS_RECEIVER_H_ | 5 #ifndef MEDIA_CAST_TEST_IN_PROCESS_RECEIVER_H_ |
6 #define MEDIA_CAST_TEST_IN_PROCESS_RECEIVER_H_ | 6 #define MEDIA_CAST_TEST_IN_PROCESS_RECEIVER_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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 94 |
95 const scoped_refptr<CastEnvironment> cast_environment_; | 95 const scoped_refptr<CastEnvironment> cast_environment_; |
96 const net::IPEndPoint local_end_point_; | 96 const net::IPEndPoint local_end_point_; |
97 const net::IPEndPoint remote_end_point_; | 97 const net::IPEndPoint remote_end_point_; |
98 const AudioReceiverConfig audio_config_; | 98 const AudioReceiverConfig audio_config_; |
99 const VideoReceiverConfig video_config_; | 99 const VideoReceiverConfig video_config_; |
100 | 100 |
101 scoped_ptr<transport::UdpTransport> transport_; | 101 scoped_ptr<transport::UdpTransport> transport_; |
102 scoped_ptr<CastReceiver> cast_receiver_; | 102 scoped_ptr<CastReceiver> cast_receiver_; |
103 | 103 |
104 // For shutdown safety, this member must be last: | 104 // NOTE: Weak pointers must be invalidated before all other member variables. |
105 base::WeakPtrFactory<InProcessReceiver> weak_factory_; | 105 base::WeakPtrFactory<InProcessReceiver> weak_factory_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(InProcessReceiver); | 107 DISALLOW_COPY_AND_ASSIGN(InProcessReceiver); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace cast | 110 } // namespace cast |
111 } // namespace media | 111 } // namespace media |
112 | 112 |
113 #endif // MEDIA_CAST_TEST_IN_PROCESS_RECEIVER_H_ | 113 #endif // MEDIA_CAST_TEST_IN_PROCESS_RECEIVER_H_ |
OLD | NEW |