| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 class CONTENT_EXPORT AudioOutputDelegate { | 26 class CONTENT_EXPORT AudioOutputDelegate { |
| 27 public: | 27 public: |
| 28 class CONTENT_EXPORT EventHandler { | 28 class CONTENT_EXPORT EventHandler { |
| 29 public: | 29 public: |
| 30 virtual ~EventHandler() {} | 30 virtual ~EventHandler() {} |
| 31 | 31 |
| 32 // All these methods are called on the IO thread. | 32 // All these methods are called on the IO thread. |
| 33 | 33 |
| 34 // Called when the state changes between playing and not playing. | |
| 35 virtual void OnStreamStateChanged(bool playing) = 0; | |
| 36 | |
| 37 // Called when construction is finished and the stream is ready for | 34 // Called when construction is finished and the stream is ready for |
| 38 // playout. | 35 // playout. |
| 39 virtual void OnStreamCreated(int stream_id, | 36 virtual void OnStreamCreated(int stream_id, |
| 40 base::SharedMemory* shared_memory, | 37 base::SharedMemory* shared_memory, |
| 41 base::CancelableSyncSocket* socket) = 0; | 38 base::CancelableSyncSocket* socket) = 0; |
| 42 | 39 |
| 43 // Called if stream encounters an error and has become unusable. | 40 // Called if stream encounters an error and has become unusable. |
| 44 virtual void OnStreamError(int stream_id) = 0; | 41 virtual void OnStreamError(int stream_id) = 0; |
| 45 }; | 42 }; |
| 46 | 43 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 58 | 55 |
| 59 // Stream control: | 56 // Stream control: |
| 60 virtual void OnPlayStream() = 0; | 57 virtual void OnPlayStream() = 0; |
| 61 virtual void OnPauseStream() = 0; | 58 virtual void OnPauseStream() = 0; |
| 62 virtual void OnSetVolume(double volume) = 0; | 59 virtual void OnSetVolume(double volume) = 0; |
| 63 }; | 60 }; |
| 64 | 61 |
| 65 } // namespace content | 62 } // namespace content |
| 66 | 63 |
| 67 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_ | 64 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DELEGATE_H_ |
| OLD | NEW |