| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOGGING_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_LOGGING_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_LOGGING_H_ | 6 #define MEDIA_AUDIO_AUDIO_LOGGING_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Called when an audio component is closed, generally this is synonymous | 37 // Called when an audio component is closed, generally this is synonymous |
| 38 // with "deleted." | 38 // with "deleted." |
| 39 virtual void OnClosed(int component_id) = 0; | 39 virtual void OnClosed(int component_id) = 0; |
| 40 | 40 |
| 41 // Called when an audio component encounters an error. | 41 // Called when an audio component encounters an error. |
| 42 virtual void OnError(int component_id) = 0; | 42 virtual void OnError(int component_id) = 0; |
| 43 | 43 |
| 44 // Called when an audio component changes volume. |volume| is the new volume. | 44 // Called when an audio component changes volume. |volume| is the new volume. |
| 45 virtual void OnSetVolume(int component_id, double volume) = 0; | 45 virtual void OnSetVolume(int component_id, double volume) = 0; |
| 46 |
| 47 // Called when an audio component switches output device. |device_id| is the |
| 48 // new audio output device. |
| 49 virtual void OnSwitchOutputDevice(int component_id, |
| 50 const std::string& device_id) = 0; |
| 46 }; | 51 }; |
| 47 | 52 |
| 48 // AudioLogFactory dispenses AudioLog instances to owning classes for tracking | 53 // AudioLogFactory dispenses AudioLog instances to owning classes for tracking |
| 49 // AudioComponent behavior. All AudioComponents have the concept of an owning | 54 // AudioComponent behavior. All AudioComponents have the concept of an owning |
| 50 // class: | 55 // class: |
| 51 // | 56 // |
| 52 // - AudioInputRendererHost for AudioInputController | 57 // - AudioInputRendererHost for AudioInputController |
| 53 // - AudioRendererHost for AudioOutputController | 58 // - AudioRendererHost for AudioOutputController |
| 54 // - AudioOutputDispatcherImpl for AudioOutputStream | 59 // - AudioOutputDispatcherImpl for AudioOutputStream |
| 55 // | 60 // |
| (...skipping 17 matching lines...) Expand all Loading... |
| 73 // create its own AudioLog. | 78 // create its own AudioLog. |
| 74 virtual scoped_ptr<AudioLog> CreateAudioLog(AudioComponent component) = 0; | 79 virtual scoped_ptr<AudioLog> CreateAudioLog(AudioComponent component) = 0; |
| 75 | 80 |
| 76 protected: | 81 protected: |
| 77 virtual ~AudioLogFactory() {} | 82 virtual ~AudioLogFactory() {} |
| 78 }; | 83 }; |
| 79 | 84 |
| 80 } // namespace media | 85 } // namespace media |
| 81 | 86 |
| 82 #endif // MEDIA_AUDIO_AUDIO_LOGGING_H_ | 87 #endif // MEDIA_AUDIO_AUDIO_LOGGING_H_ |
| OLD | NEW |