| 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_output.h" | 5 #include "content/renderer/pepper/pepper_platform_audio_output.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/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 main_message_loop_proxy_->PostTask( | 93 main_message_loop_proxy_->PostTask( |
| 94 FROM_HERE, | 94 FROM_HERE, |
| 95 base::Bind(&PepperPlatformAudioOutput::OnStreamCreated, | 95 base::Bind(&PepperPlatformAudioOutput::OnStreamCreated, |
| 96 this, | 96 this, |
| 97 handle, | 97 handle, |
| 98 socket_handle, | 98 socket_handle, |
| 99 length)); | 99 length)); |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 void PepperPlatformAudioOutput::OnDeviceSwitched( |
| 104 int request_id, |
| 105 media::AudioOutputIPCDelegate::DeviceSwitchResult result) {} |
| 106 |
| 103 void PepperPlatformAudioOutput::OnIPCClosed() { ipc_.reset(); } | 107 void PepperPlatformAudioOutput::OnIPCClosed() { ipc_.reset(); } |
| 104 | 108 |
| 105 PepperPlatformAudioOutput::~PepperPlatformAudioOutput() { | 109 PepperPlatformAudioOutput::~PepperPlatformAudioOutput() { |
| 106 // Make sure we have been shut down. Warning: this will usually happen on | 110 // Make sure we have been shut down. Warning: this will usually happen on |
| 107 // the I/O thread! | 111 // the I/O thread! |
| 108 DCHECK(!ipc_); | 112 DCHECK(!ipc_); |
| 109 DCHECK(!client_); | 113 DCHECK(!client_); |
| 110 } | 114 } |
| 111 | 115 |
| 112 PepperPlatformAudioOutput::PepperPlatformAudioOutput() | 116 PepperPlatformAudioOutput::PepperPlatformAudioOutput() |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 return; | 172 return; |
| 169 | 173 |
| 170 ipc_->CloseStream(); | 174 ipc_->CloseStream(); |
| 171 ipc_.reset(); | 175 ipc_.reset(); |
| 172 | 176 |
| 173 Release(); // Release for the delegate, balances out the reference taken in | 177 Release(); // Release for the delegate, balances out the reference taken in |
| 174 // PepperPlatformAudioOutput::Create. | 178 // PepperPlatformAudioOutput::Create. |
| 175 } | 179 } |
| 176 | 180 |
| 177 } // namespace content | 181 } // namespace content |
| OLD | NEW |