| 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 // Audio rendering unit utilizing audio output stream provided by browser | 5 // Audio rendering unit utilizing audio output stream provided by browser |
| 6 // process through IPC. | 6 // process through IPC. |
| 7 // | 7 // |
| 8 // Relationship of classes. | 8 // Relationship of classes. |
| 9 // | 9 // |
| 10 // AudioOutputController AudioOutputDevice | 10 // AudioOutputController AudioOutputDevice |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 void Initialize(const AudioParameters& params, | 91 void Initialize(const AudioParameters& params, |
| 92 RenderCallback* callback) override; | 92 RenderCallback* callback) override; |
| 93 void Start() override; | 93 void Start() override; |
| 94 void Stop() override; | 94 void Stop() override; |
| 95 void Play() override; | 95 void Play() override; |
| 96 void Pause() override; | 96 void Pause() override; |
| 97 bool SetVolume(double volume) override; | 97 bool SetVolume(double volume) override; |
| 98 | 98 |
| 99 // Methods called on IO thread ---------------------------------------------- | 99 // Methods called on IO thread ---------------------------------------------- |
| 100 // AudioOutputIPCDelegate methods. | 100 // AudioOutputIPCDelegate methods. |
| 101 void OnStateChanged(AudioOutputIPCDelegate::State state) override; | 101 void OnStateChanged(AudioOutputIPCDelegateState state) override; |
| 102 void OnStreamCreated(base::SharedMemoryHandle handle, | 102 void OnStreamCreated(base::SharedMemoryHandle handle, |
| 103 base::SyncSocket::Handle socket_handle, | 103 base::SyncSocket::Handle socket_handle, |
| 104 int length) override; | 104 int length) override; |
| 105 void OnIPCClosed() override; | 105 void OnIPCClosed() override; |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 // Magic required by ref_counted.h to avoid any code deleting the object | 108 // Magic required by ref_counted.h to avoid any code deleting the object |
| 109 // accidentally while there are references to it. | 109 // accidentally while there are references to it. |
| 110 friend class base::RefCountedThreadSafe<AudioOutputDevice>; | 110 friend class base::RefCountedThreadSafe<AudioOutputDevice>; |
| 111 ~AudioOutputDevice() override; | 111 ~AudioOutputDevice() override; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept | 170 // TODO(scherkus): Replace this by changing AudioRendererSink to either accept |
| 171 // the callback via Start(). See http://crbug.com/151051 for details. | 171 // the callback via Start(). See http://crbug.com/151051 for details. |
| 172 bool stopping_hack_; | 172 bool stopping_hack_; |
| 173 | 173 |
| 174 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); | 174 DISALLOW_COPY_AND_ASSIGN(AudioOutputDevice); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace media | 177 } // namespace media |
| 178 | 178 |
| 179 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ | 179 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_DEVICE_H_ |
| OLD | NEW |