Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: content/renderer/pepper/pepper_platform_audio_output.cc

Issue 1186943003: Revert of Add support for the audio-output-device switching IPC mechanism to the renderer lower... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // occurred while the request was in-flight, so we need to NULL check. 90 // occurred while the request was in-flight, so we need to NULL check.
91 if (client_) 91 if (client_)
92 client_->StreamCreated(handle, length, socket_handle); 92 client_->StreamCreated(handle, length, socket_handle);
93 } else { 93 } else {
94 main_task_runner_->PostTask( 94 main_task_runner_->PostTask(
95 FROM_HERE, base::Bind(&PepperPlatformAudioOutput::OnStreamCreated, this, 95 FROM_HERE, base::Bind(&PepperPlatformAudioOutput::OnStreamCreated, this,
96 handle, socket_handle, length)); 96 handle, socket_handle, length));
97 } 97 }
98 } 98 }
99 99
100 void PepperPlatformAudioOutput::OnOutputDeviceSwitched(
101 int request_id,
102 media::SwitchOutputDeviceResult result) {}
103
104 void PepperPlatformAudioOutput::OnIPCClosed() { ipc_.reset(); } 100 void PepperPlatformAudioOutput::OnIPCClosed() { ipc_.reset(); }
105 101
106 PepperPlatformAudioOutput::~PepperPlatformAudioOutput() { 102 PepperPlatformAudioOutput::~PepperPlatformAudioOutput() {
107 // Make sure we have been shut down. Warning: this will usually happen on 103 // Make sure we have been shut down. Warning: this will usually happen on
108 // the I/O thread! 104 // the I/O thread!
109 DCHECK(!ipc_); 105 DCHECK(!ipc_);
110 DCHECK(!client_); 106 DCHECK(!client_);
111 } 107 }
112 108
113 PepperPlatformAudioOutput::PepperPlatformAudioOutput() 109 PepperPlatformAudioOutput::PepperPlatformAudioOutput()
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 return; 164 return;
169 165
170 ipc_->CloseStream(); 166 ipc_->CloseStream();
171 ipc_.reset(); 167 ipc_.reset();
172 168
173 Release(); // Release for the delegate, balances out the reference taken in 169 Release(); // Release for the delegate, balances out the reference taken in
174 // PepperPlatformAudioOutput::Create. 170 // PepperPlatformAudioOutput::Create.
175 } 171 }
176 172
177 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output.h ('k') | media/audio/audio_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698