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 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" | 5 #include "content/renderer/pepper/pepper_platform_audio_input_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/common/child_process.h" | 11 #include "content/common/child_process.h" |
12 #include "content/common/media/audio_messages.h" | 12 #include "content/common/media/audio_messages.h" |
13 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 13 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
14 #include "content/renderer/render_thread_impl.h" | 14 #include "content/renderer/render_thread_impl.h" |
15 #include "media/audio/audio_manager_base.h" | 15 #include "media/audio/audio_manager_base.h" |
16 | 16 |
| 17 namespace content { |
| 18 |
17 PepperPlatformAudioInputImpl::PepperPlatformAudioInputImpl() | 19 PepperPlatformAudioInputImpl::PepperPlatformAudioInputImpl() |
18 : client_(NULL), | 20 : client_(NULL), |
19 stream_id_(0), | 21 stream_id_(0), |
20 main_message_loop_proxy_(base::MessageLoopProxy::current()), | 22 main_message_loop_proxy_(base::MessageLoopProxy::current()), |
21 shutdown_called_(false) { | 23 shutdown_called_(false) { |
22 filter_ = RenderThreadImpl::current()->audio_input_message_filter(); | 24 filter_ = RenderThreadImpl::current()->audio_input_message_filter(); |
23 } | 25 } |
24 | 26 |
25 PepperPlatformAudioInputImpl::~PepperPlatformAudioInputImpl() { | 27 PepperPlatformAudioInputImpl::~PepperPlatformAudioInputImpl() { |
26 // Make sure we have been shut down. Warning: this may happen on the I/O | 28 // Make sure we have been shut down. Warning: this may happen on the I/O |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 label_.clear(); | 269 label_.clear(); |
268 } | 270 } |
269 } | 271 } |
270 | 272 |
271 void PepperPlatformAudioInputImpl::NotifyStreamCreationFailed() { | 273 void PepperPlatformAudioInputImpl::NotifyStreamCreationFailed() { |
272 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread()); | 274 DCHECK(main_message_loop_proxy_->BelongsToCurrentThread()); |
273 | 275 |
274 if (client_) | 276 if (client_) |
275 client_->StreamCreationFailed(); | 277 client_->StreamCreationFailed(); |
276 } | 278 } |
| 279 |
| 280 } // namespace content |
OLD | NEW |