Add Download.ShowDangerousDownloadConfirmationPrompt for Windows/CrOS
[chromium-blink-merge.git] / remoting / protocol / audio_writer.h
blob0ec008e443ab36050494d20552a7e0e84aeadf53
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_PROTOCOL_AUDIO_WRITER_H_
6 #define REMOTING_PROTOCOL_AUDIO_WRITER_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/callback.h"
12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/audio_stub.h"
15 #include "remoting/protocol/buffered_socket_writer.h"
16 #include "remoting/protocol/channel_dispatcher_base.h"
18 namespace net {
19 class StreamSocket;
20 } // namespace net
22 namespace remoting {
23 namespace protocol {
25 class Session;
26 class SessionConfig;
28 class AudioWriter : public ChannelDispatcherBase,
29 public AudioStub {
30 public:
31 // Once AudioWriter is created, the Init() method of ChannelDispatcherBase
32 // should be used to initialize it for the session.
33 static scoped_ptr<AudioWriter> Create(const SessionConfig& config);
35 virtual ~AudioWriter();
37 // AudioStub interface.
38 virtual void ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
39 const base::Closure& done) OVERRIDE;
41 protected:
42 virtual void OnInitialized() OVERRIDE;
44 private:
45 AudioWriter();
47 BufferedSocketWriter buffered_writer_;
49 DISALLOW_COPY_AND_ASSIGN(AudioWriter);
52 } // namespace protocol
53 } // namespace remoting
55 #endif // REMOTING_PROTOCOL_AUDIO_WRITER_H_