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

Side by Side Diff: remoting/protocol/audio_writer.h

Issue 1864213002: Convert //remoting to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mac IWYU 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 | « remoting/protocol/audio_stub.h ('k') | remoting/protocol/audio_writer.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_PROTOCOL_AUDIO_WRITER_H_ 5 #ifndef REMOTING_PROTOCOL_AUDIO_WRITER_H_
6 #define REMOTING_PROTOCOL_AUDIO_WRITER_H_ 6 #define REMOTING_PROTOCOL_AUDIO_WRITER_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 10
10 #include "base/callback.h" 11 #include "base/callback.h"
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/audio_stub.h" 14 #include "remoting/protocol/audio_stub.h"
15 #include "remoting/protocol/channel_dispatcher_base.h" 15 #include "remoting/protocol/channel_dispatcher_base.h"
16 16
17 namespace net { 17 namespace net {
18 class StreamSocket; 18 class StreamSocket;
19 } // namespace net 19 } // namespace net
20 20
21 namespace remoting { 21 namespace remoting {
22 namespace protocol { 22 namespace protocol {
23 23
24 class Session; 24 class Session;
25 class SessionConfig; 25 class SessionConfig;
26 26
27 class AudioWriter : public ChannelDispatcherBase, 27 class AudioWriter : public ChannelDispatcherBase,
28 public AudioStub { 28 public AudioStub {
29 public: 29 public:
30 // Once AudioWriter is created, the Init() method of ChannelDispatcherBase 30 // Once AudioWriter is created, the Init() method of ChannelDispatcherBase
31 // should be used to initialize it for the session. 31 // should be used to initialize it for the session.
32 static scoped_ptr<AudioWriter> Create(const SessionConfig& config); 32 static std::unique_ptr<AudioWriter> Create(const SessionConfig& config);
33 33
34 ~AudioWriter() override; 34 ~AudioWriter() override;
35 35
36 // AudioStub interface. 36 // AudioStub interface.
37 void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 37 void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet,
38 const base::Closure& done) override; 38 const base::Closure& done) override;
39 39
40 private: 40 private:
41 AudioWriter(); 41 AudioWriter();
42 42
43 void OnIncomingMessage(scoped_ptr<CompoundBuffer> message) override; 43 void OnIncomingMessage(std::unique_ptr<CompoundBuffer> message) override;
44 44
45 DISALLOW_COPY_AND_ASSIGN(AudioWriter); 45 DISALLOW_COPY_AND_ASSIGN(AudioWriter);
46 }; 46 };
47 47
48 } // namespace protocol 48 } // namespace protocol
49 } // namespace remoting 49 } // namespace remoting
50 50
51 #endif // REMOTING_PROTOCOL_AUDIO_WRITER_H_ 51 #endif // REMOTING_PROTOCOL_AUDIO_WRITER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/audio_stub.h ('k') | remoting/protocol/audio_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698