OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_MOJO_SERVICES_MOJO_AUDIO_OUTPUT_STREAM_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_AUDIO_OUTPUT_STREAM_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_OUTPUT_STREAM_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_AUDIO_OUTPUT_STREAM_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 ~MojoAudioOutputStream() override; | 41 ~MojoAudioOutputStream() override; |
42 | 42 |
43 private: | 43 private: |
44 // mojom::AudioOutputStream implementation. | 44 // mojom::AudioOutputStream implementation. |
45 void Play() override; | 45 void Play() override; |
46 void Pause() override; | 46 void Pause() override; |
47 void SetVolume(double volume) override; | 47 void SetVolume(double volume) override; |
48 | 48 |
49 // AudioOutputDelegate::EventHandler implementation. | 49 // AudioOutputDelegate::EventHandler implementation. |
50 void OnStreamCreated(int stream_id, | 50 void OnStreamCreated( |
51 base::SharedMemory* shared_memory, | 51 int stream_id, |
52 base::CancelableSyncSocket* foreign_socket) override; | 52 base::SharedMemory* shared_memory, |
| 53 std::unique_ptr<base::CancelableSyncSocket> foreign_socket) override; |
53 void OnStreamError(int stream_id) override; | 54 void OnStreamError(int stream_id) override; |
54 | 55 |
55 // Closes connection to client and notifies owner. | 56 // Closes connection to client and notifies owner. |
56 void OnError(); | 57 void OnError(); |
57 | 58 |
58 StreamCreatedCallback stream_created_callback_; | 59 StreamCreatedCallback stream_created_callback_; |
59 base::OnceClosure deleter_callback_; | 60 base::OnceClosure deleter_callback_; |
60 mojo::Binding<AudioOutputStream> binding_; | 61 mojo::Binding<AudioOutputStream> binding_; |
61 base::ThreadChecker thread_checker_; | 62 base::ThreadChecker thread_checker_; |
62 std::unique_ptr<AudioOutputDelegate> delegate_; | 63 std::unique_ptr<AudioOutputDelegate> delegate_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(MojoAudioOutputStream); | 65 DISALLOW_COPY_AND_ASSIGN(MojoAudioOutputStream); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace media | 68 } // namespace media |
68 | 69 |
69 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_OUTPUT_STREAM_H_ | 70 #endif // MEDIA_MOJO_SERVICES_MOJO_AUDIO_OUTPUT_STREAM_H_ |
OLD | NEW |