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

Side by Side Diff: remoting/client/audio_decode_scheduler.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/base/vlog_net_log.cc ('k') | remoting/client/audio_decode_scheduler.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_CLIENT_AUDIO_DECODE_SCHEDULER_H_ 5 #ifndef REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
6 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ 6 #define REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "remoting/protocol/audio_stub.h" 12 #include "remoting/protocol/audio_stub.h"
12 13
13 namespace base { 14 namespace base {
14 class SingleThreadTaskRunner; 15 class SingleThreadTaskRunner;
15 } // namespace base 16 } // namespace base
16 17
17 namespace remoting { 18 namespace remoting {
18 19
19 namespace protocol { 20 namespace protocol {
20 class SessionConfig; 21 class SessionConfig;
21 } // namespace protocol 22 } // namespace protocol
22 23
23 class AudioDecoder; 24 class AudioDecoder;
24 class AudioPacket; 25 class AudioPacket;
25 class AudioPlayer; 26 class AudioPlayer;
26 27
27 class AudioDecodeScheduler : public protocol::AudioStub { 28 class AudioDecodeScheduler : public protocol::AudioStub {
28 public: 29 public:
29 AudioDecodeScheduler( 30 AudioDecodeScheduler(
30 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 31 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
31 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, 32 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner,
32 scoped_ptr<AudioPlayer> audio_player); 33 std::unique_ptr<AudioPlayer> audio_player);
33 ~AudioDecodeScheduler() override; 34 ~AudioDecodeScheduler() override;
34 35
35 // Initializes decoder with the information from the protocol config. 36 // Initializes decoder with the information from the protocol config.
36 void Initialize(const protocol::SessionConfig& config); 37 void Initialize(const protocol::SessionConfig& config);
37 38
38 // AudioStub implementation. 39 // AudioStub implementation.
39 void ProcessAudioPacket(scoped_ptr<AudioPacket> packet, 40 void ProcessAudioPacket(std::unique_ptr<AudioPacket> packet,
40 const base::Closure& done) override; 41 const base::Closure& done) override;
41 42
42 private: 43 private:
43 class Core; 44 class Core;
44 45
45 scoped_refptr<Core> core_; 46 scoped_refptr<Core> core_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler); 48 DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler);
48 }; 49 };
49 50
50 } // namespace remoting 51 } // namespace remoting
51 52
52 #endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_ 53 #endif // REMOTING_CLIENT_AUDIO_DECODE_SCHEDULER_H_
OLDNEW
« no previous file with comments | « remoting/base/vlog_net_log.cc ('k') | remoting/client/audio_decode_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698