Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: media/audio/audio_output_controller.h

Issue 2900043002: Added initial set of logging for AudioOutputController. (Closed)
Patch Set: Turned DoLog static, so we can log things even when delegate_ has disappeared. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 78
liberato (no reviews please) 2017/05/30 16:53:35 please delete the extra blank line, here and elsew
79 virtual void OnLog(const std::string& message) = 0;
80
79 protected: 81 protected:
80 virtual ~EventHandler() {} 82 virtual ~EventHandler() {}
81 }; 83 };
82 84
83 // A synchronous reader interface used by AudioOutputController for 85 // A synchronous reader interface used by AudioOutputController for
84 // synchronous reading. 86 // synchronous reading.
85 // TODO(crogers): find a better name for this class and the Read() method 87 // TODO(crogers): find a better name for this class and the Read() method
86 // now that it can handle synchronized I/O. 88 // now that it can handle synchronized I/O.
87 class SyncReader { 89 class SyncReader {
88 public: 90 public:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // be accessed while |error_lock_| is held. 270 // be accessed while |error_lock_| is held.
269 bool ignore_errors_during_stop_close_; 271 bool ignore_errors_during_stop_close_;
270 base::Lock error_lock_; 272 base::Lock error_lock_;
271 273
272 DISALLOW_COPY_AND_ASSIGN(AudioOutputController); 274 DISALLOW_COPY_AND_ASSIGN(AudioOutputController);
273 }; 275 };
274 276
275 } // namespace media 277 } // namespace media
276 278
277 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ 279 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698