| 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.h" | 5 #include "content/renderer/pepper/pepper_platform_audio_input.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } else { | 105 } else { |
| 106 // Clean up the handles. | 106 // Clean up the handles. |
| 107 base::SyncSocket temp_socket(socket_handle); | 107 base::SyncSocket temp_socket(socket_handle); |
| 108 base::SharedMemory temp_shared_memory(handle, false); | 108 base::SharedMemory temp_shared_memory(handle, false); |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 void PepperPlatformAudioInput::OnError() {} | 113 void PepperPlatformAudioInput::OnError() {} |
| 114 | 114 |
| 115 void PepperPlatformAudioInput::OnMuted(bool is_muted) {} |
| 116 |
| 115 void PepperPlatformAudioInput::OnIPCClosed() { ipc_.reset(); } | 117 void PepperPlatformAudioInput::OnIPCClosed() { ipc_.reset(); } |
| 116 | 118 |
| 117 PepperPlatformAudioInput::~PepperPlatformAudioInput() { | 119 PepperPlatformAudioInput::~PepperPlatformAudioInput() { |
| 118 // Make sure we have been shut down. Warning: this may happen on the I/O | 120 // Make sure we have been shut down. Warning: this may happen on the I/O |
| 119 // thread! | 121 // thread! |
| 120 // Although these members should be accessed on a specific thread (either the | 122 // Although these members should be accessed on a specific thread (either the |
| 121 // main thread or the I/O thread), it should be fine to examine their value | 123 // main thread or the I/O thread), it should be fine to examine their value |
| 122 // here. | 124 // here. |
| 123 DCHECK(!ipc_); | 125 DCHECK(!ipc_); |
| 124 DCHECK(!client_); | 126 DCHECK(!client_); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() { | 276 PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() { |
| 275 DCHECK(main_task_runner_->BelongsToCurrentThread()); | 277 DCHECK(main_task_runner_->BelongsToCurrentThread()); |
| 276 | 278 |
| 277 RenderFrameImpl* const render_frame = | 279 RenderFrameImpl* const render_frame = |
| 278 RenderFrameImpl::FromRoutingID(render_frame_id_); | 280 RenderFrameImpl::FromRoutingID(render_frame_id_); |
| 279 return render_frame ? | 281 return render_frame ? |
| 280 PepperMediaDeviceManager::GetForRenderFrame(render_frame).get() : NULL; | 282 PepperMediaDeviceManager::GetForRenderFrame(render_frame).get() : NULL; |
| 281 } | 283 } |
| 282 | 284 |
| 283 } // namespace content | 285 } // namespace content |
| OLD | NEW |