| 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_OUTPUT_CONTROLLER_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 NON_EXPORTED_BASE(public AudioManager::AudioDeviceListener) { | 68 NON_EXPORTED_BASE(public AudioManager::AudioDeviceListener) { |
| 69 public: | 69 public: |
| 70 // An event handler that receives events from the AudioOutputController. The | 70 // An event handler that receives events from the AudioOutputController. The |
| 71 // following methods are called on the audio manager thread. | 71 // following methods are called on the audio manager thread. |
| 72 class MEDIA_EXPORT EventHandler { | 72 class MEDIA_EXPORT EventHandler { |
| 73 public: | 73 public: |
| 74 virtual void OnControllerCreated() = 0; | 74 virtual void OnControllerCreated() = 0; |
| 75 virtual void OnControllerPlaying() = 0; | 75 virtual void OnControllerPlaying() = 0; |
| 76 virtual void OnControllerPaused() = 0; | 76 virtual void OnControllerPaused() = 0; |
| 77 virtual void OnControllerError() = 0; | 77 virtual void OnControllerError() = 0; |
| 78 virtual void OnLog(const std::string& message) = 0; |
| 78 | 79 |
| 79 protected: | 80 protected: |
| 80 virtual ~EventHandler() {} | 81 virtual ~EventHandler() {} |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 // A synchronous reader interface used by AudioOutputController for | 84 // A synchronous reader interface used by AudioOutputController for |
| 84 // synchronous reading. | 85 // synchronous reading. |
| 85 // TODO(crogers): find a better name for this class and the Read() method | 86 // TODO(crogers): find a better name for this class and the Read() method |
| 86 // now that it can handle synchronized I/O. | 87 // now that it can handle synchronized I/O. |
| 87 class SyncReader { | 88 class SyncReader { |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // be accessed while |error_lock_| is held. | 269 // be accessed while |error_lock_| is held. |
| 269 bool ignore_errors_during_stop_close_; | 270 bool ignore_errors_during_stop_close_; |
| 270 base::Lock error_lock_; | 271 base::Lock error_lock_; |
| 271 | 272 |
| 272 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); | 273 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); |
| 273 }; | 274 }; |
| 274 | 275 |
| 275 } // namespace media | 276 } // namespace media |
| 276 | 277 |
| 277 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ | 278 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ |
| OLD | NEW |