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

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

Issue 2582533002: Simplify AudioInputRendererHost IPC interface. (Closed)
Patch Set: Rebase. Created 3 years, 11 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_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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 if (client_) { 106 if (client_) {
107 client_->StreamCreated(handle, length, socket_handle); 107 client_->StreamCreated(handle, length, socket_handle);
108 } else { 108 } else {
109 // Clean up the handles. 109 // Clean up the handles.
110 base::SyncSocket temp_socket(socket_handle); 110 base::SyncSocket temp_socket(socket_handle);
111 base::SharedMemory temp_shared_memory(handle, false); 111 base::SharedMemory temp_shared_memory(handle, false);
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 void PepperPlatformAudioInput::OnVolume(double volume) {} 116 void PepperPlatformAudioInput::OnError() {}
117
118 void PepperPlatformAudioInput::OnStateChanged(
119 media::AudioInputIPCDelegateState state) {}
120 117
121 void PepperPlatformAudioInput::OnIPCClosed() { ipc_.reset(); } 118 void PepperPlatformAudioInput::OnIPCClosed() { ipc_.reset(); }
122 119
123 PepperPlatformAudioInput::~PepperPlatformAudioInput() { 120 PepperPlatformAudioInput::~PepperPlatformAudioInput() {
124 // Make sure we have been shut down. Warning: this may happen on the I/O 121 // Make sure we have been shut down. Warning: this may happen on the I/O
125 // thread! 122 // thread!
126 // Although these members should be accessed on a specific thread (either the 123 // Although these members should be accessed on a specific thread (either the
127 // main thread or the I/O thread), it should be fine to examine their value 124 // main thread or the I/O thread), it should be fine to examine their value
128 // here. 125 // here.
129 DCHECK(!ipc_); 126 DCHECK(!ipc_);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() { 278 PepperMediaDeviceManager* PepperPlatformAudioInput::GetMediaDeviceManager() {
282 DCHECK(main_task_runner_->BelongsToCurrentThread()); 279 DCHECK(main_task_runner_->BelongsToCurrentThread());
283 280
284 RenderFrameImpl* const render_frame = 281 RenderFrameImpl* const render_frame =
285 RenderFrameImpl::FromRoutingID(render_frame_id_); 282 RenderFrameImpl::FromRoutingID(render_frame_id_);
286 return render_frame ? 283 return render_frame ?
287 PepperMediaDeviceManager::GetForRenderFrame(render_frame).get() : NULL; 284 PepperMediaDeviceManager::GetForRenderFrame(render_frame).get() : NULL;
288 } 285 }
289 286
290 } // namespace content 287 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698