OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "media/audio/audio_output_proxy.h" | 5 #include "media/audio/audio_output_proxy.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/task.h" | |
10 #include "media/audio/audio_manager.h" | 9 #include "media/audio/audio_manager.h" |
11 #include "media/audio/audio_output_dispatcher.h" | 10 #include "media/audio/audio_output_dispatcher.h" |
12 | 11 |
13 AudioOutputProxy::AudioOutputProxy(AudioOutputDispatcher* dispatcher) | 12 AudioOutputProxy::AudioOutputProxy(AudioOutputDispatcher* dispatcher) |
14 : dispatcher_(dispatcher), | 13 : dispatcher_(dispatcher), |
15 state_(kCreated), | 14 state_(kCreated), |
16 physical_stream_(NULL), | 15 physical_stream_(NULL), |
17 volume_(1.0) { | 16 volume_(1.0) { |
18 DCHECK_EQ(MessageLoop::current(), dispatcher_->message_loop()); | 17 DCHECK_EQ(MessageLoop::current(), dispatcher_->message_loop()); |
19 } | 18 } |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 dispatcher_->StreamClosed(); | 87 dispatcher_->StreamClosed(); |
89 | 88 |
90 state_ = kClosed; | 89 state_ = kClosed; |
91 | 90 |
92 // Delete the object now like is done in the Close() implementation of | 91 // Delete the object now like is done in the Close() implementation of |
93 // physical stream objects. If we delete the object via DeleteSoon, we | 92 // physical stream objects. If we delete the object via DeleteSoon, we |
94 // unnecessarily complicate the Shutdown procedure of the | 93 // unnecessarily complicate the Shutdown procedure of the |
95 // dispatcher+audio manager. | 94 // dispatcher+audio manager. |
96 delete this; | 95 delete this; |
97 } | 96 } |
OLD | NEW |