| OLD | NEW |
| 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 MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ | 6 #define MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // parameter changes back. The AudioInputDevice must read from this socket | 28 // parameter changes back. The AudioInputDevice must read from this socket |
| 29 // and process the shared memory whenever data is read from the socket. | 29 // and process the shared memory whenever data is read from the socket. |
| 30 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 30 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
| 31 base::SyncSocket::Handle socket_handle, | 31 base::SyncSocket::Handle socket_handle, |
| 32 int length, | 32 int length, |
| 33 int total_segments) = 0; | 33 int total_segments) = 0; |
| 34 | 34 |
| 35 // Called when state of an audio stream has changed. | 35 // Called when state of an audio stream has changed. |
| 36 virtual void OnError() = 0; | 36 virtual void OnError() = 0; |
| 37 | 37 |
| 38 // Called when an audio stream is muted or unmuted. |
| 39 virtual void OnMuted(bool is_muted) = 0; |
| 40 |
| 38 // Called when the AudioInputIPC object is going away and/or when the | 41 // Called when the AudioInputIPC object is going away and/or when the |
| 39 // IPC channel has been closed and no more IPC requests can be made. | 42 // IPC channel has been closed and no more IPC requests can be made. |
| 40 // Implementations should delete their owned AudioInputIPC instance | 43 // Implementations should delete their owned AudioInputIPC instance |
| 41 // immediately. | 44 // immediately. |
| 42 virtual void OnIPCClosed() = 0; | 45 virtual void OnIPCClosed() = 0; |
| 43 | 46 |
| 44 protected: | 47 protected: |
| 45 virtual ~AudioInputIPCDelegate(); | 48 virtual ~AudioInputIPCDelegate(); |
| 46 }; | 49 }; |
| 47 | 50 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 71 virtual void SetVolume(double volume) = 0; | 74 virtual void SetVolume(double volume) = 0; |
| 72 | 75 |
| 73 // Closes the audio stream, which should shut down the corresponding | 76 // Closes the audio stream, which should shut down the corresponding |
| 74 // AudioInputController in the peer process. | 77 // AudioInputController in the peer process. |
| 75 virtual void CloseStream() = 0; | 78 virtual void CloseStream() = 0; |
| 76 }; | 79 }; |
| 77 | 80 |
| 78 } // namespace media | 81 } // namespace media |
| 79 | 82 |
| 80 #endif // MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ | 83 #endif // MEDIA_AUDIO_AUDIO_INPUT_IPC_H_ |
| OLD | NEW |