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

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

Issue 1905763002: Convert //media/cast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « media/cast/cast_sender.h ('k') | media/cast/cast_sender_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <memory>
8
7 #include "base/macros.h" 9 #include "base/macros.h"
8 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "media/cast/cast_environment.h" 11 #include "media/cast/cast_environment.h"
11 #include "media/cast/cast_sender.h" 12 #include "media/cast/cast_sender.h"
12 #include "media/cast/sender/audio_sender.h" 13 #include "media/cast/sender/audio_sender.h"
13 #include "media/cast/sender/video_sender.h" 14 #include "media/cast/sender/video_sender.h"
14 15
15 namespace media { 16 namespace media {
16 class VideoFrame; 17 class VideoFrame;
17 18
18 namespace cast { 19 namespace cast {
19 class AudioSender; 20 class AudioSender;
(...skipping 16 matching lines...) Expand all
36 final; 37 final;
37 38
38 void SetTargetPlayoutDelay(base::TimeDelta new_target_playout_delay) final; 39 void SetTargetPlayoutDelay(base::TimeDelta new_target_playout_delay) final;
39 40
40 ~CastSenderImpl() final; 41 ~CastSenderImpl() final;
41 42
42 scoped_refptr<AudioFrameInput> audio_frame_input() final; 43 scoped_refptr<AudioFrameInput> audio_frame_input() final;
43 scoped_refptr<VideoFrameInput> video_frame_input() final; 44 scoped_refptr<VideoFrameInput> video_frame_input() final;
44 45
45 private: 46 private:
46 void ReceivedPacket(scoped_ptr<Packet> packet); 47 void ReceivedPacket(std::unique_ptr<Packet> packet);
47 void OnAudioStatusChange(const StatusChangeCallback& status_change_cb, 48 void OnAudioStatusChange(const StatusChangeCallback& status_change_cb,
48 OperationalStatus status); 49 OperationalStatus status);
49 void OnVideoStatusChange(const StatusChangeCallback& status_change_cb, 50 void OnVideoStatusChange(const StatusChangeCallback& status_change_cb,
50 OperationalStatus status); 51 OperationalStatus status);
51 52
52 scoped_ptr<AudioSender> audio_sender_; 53 std::unique_ptr<AudioSender> audio_sender_;
53 scoped_ptr<VideoSender> video_sender_; 54 std::unique_ptr<VideoSender> video_sender_;
54 scoped_refptr<AudioFrameInput> audio_frame_input_; 55 scoped_refptr<AudioFrameInput> audio_frame_input_;
55 scoped_refptr<VideoFrameInput> video_frame_input_; 56 scoped_refptr<VideoFrameInput> video_frame_input_;
56 scoped_refptr<CastEnvironment> cast_environment_; 57 scoped_refptr<CastEnvironment> cast_environment_;
57 // The transport sender is owned by the owner of the CastSender, and should be 58 // The transport sender is owned by the owner of the CastSender, and should be
58 // valid throughout the lifetime of the CastSender. 59 // valid throughout the lifetime of the CastSender.
59 CastTransport* const transport_sender_; 60 CastTransport* const transport_sender_;
60 61
61 // NOTE: Weak pointers must be invalidated before all other member variables. 62 // NOTE: Weak pointers must be invalidated before all other member variables.
62 base::WeakPtrFactory<CastSenderImpl> weak_factory_; 63 base::WeakPtrFactory<CastSenderImpl> weak_factory_;
63 64
64 DISALLOW_COPY_AND_ASSIGN(CastSenderImpl); 65 DISALLOW_COPY_AND_ASSIGN(CastSenderImpl);
65 }; 66 };
66 67
67 } // namespace cast 68 } // namespace cast
68 } // namespace media 69 } // namespace media
69 70
70 #endif // MEDIA_CAST_CAST_SENDER_IMPL_H_ 71 #endif // MEDIA_CAST_CAST_SENDER_IMPL_H_
OLDNEW
« no previous file with comments | « media/cast/cast_sender.h ('k') | media/cast/cast_sender_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698