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_MANAGER_BASE_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 6 #define MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
| 11 #include "base/atomic_ref_count.h" |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
14 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
15 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
16 #include "media/audio/audio_manager.h" | 17 #include "media/audio/audio_manager.h" |
17 | 18 |
18 #include "media/audio/audio_output_dispatcher.h" | 19 #include "media/audio/audio_output_dispatcher.h" |
19 | 20 |
20 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 // and GetTaskRunner() starts returning NULL. | 190 // and GetTaskRunner() starts returning NULL. |
190 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 191 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
191 | 192 |
192 // Map of cached AudioOutputDispatcher instances. Must only be touched | 193 // Map of cached AudioOutputDispatcher instances. Must only be touched |
193 // from the audio thread (no locking). | 194 // from the audio thread (no locking). |
194 AudioOutputDispatchers output_dispatchers_; | 195 AudioOutputDispatchers output_dispatchers_; |
195 | 196 |
196 // Proxy for creating AudioLog objects. | 197 // Proxy for creating AudioLog objects. |
197 AudioLogFactory* const audio_log_factory_; | 198 AudioLogFactory* const audio_log_factory_; |
198 | 199 |
| 200 // Used to exit early from expensive methods after shutdown has started. |
| 201 base::AtomicRefCount in_shutdown_; |
| 202 |
199 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); | 203 DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
200 }; | 204 }; |
201 | 205 |
202 } // namespace media | 206 } // namespace media |
203 | 207 |
204 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ | 208 #endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_ |
OLD | NEW |