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

Side by Side Diff: content/renderer/media/audio_message_filter.cc

Issue 2496653002: Part 2 of base::IDMap refactor to eliminate IDMapOwnPointer/IDMapExternalPointer modes (Closed)
Patch Set: typedefs => using statements, update comments in base/id_map.h Created 4 years 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/media/audio_message_filter.h" 5 #include "content/renderer/media/audio_message_filter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 OnChannelClosing(); 169 OnChannelClosing();
170 } 170 }
171 171
172 void AudioMessageFilter::OnChannelClosing() { 172 void AudioMessageFilter::OnChannelClosing() {
173 DCHECK(io_task_runner_->BelongsToCurrentThread()); 173 DCHECK(io_task_runner_->BelongsToCurrentThread());
174 sender_ = NULL; 174 sender_ = NULL;
175 175
176 DLOG_IF(WARNING, !delegates_.IsEmpty()) 176 DLOG_IF(WARNING, !delegates_.IsEmpty())
177 << "Not all audio devices have been closed."; 177 << "Not all audio devices have been closed.";
178 178
179 IDMap<media::AudioOutputIPCDelegate>::iterator it(&delegates_); 179 IDMap<media::AudioOutputIPCDelegate*>::iterator it(&delegates_);
180 while (!it.IsAtEnd()) { 180 while (!it.IsAtEnd()) {
181 it.GetCurrentValue()->OnIPCClosed(); 181 it.GetCurrentValue()->OnIPCClosed();
182 delegates_.Remove(it.GetCurrentKey()); 182 delegates_.Remove(it.GetCurrentKey());
183 it.Advance(); 183 it.Advance();
184 } 184 }
185 } 185 }
186 186
187 void AudioMessageFilter::OnDeviceAuthorized( 187 void AudioMessageFilter::OnDeviceAuthorized(
188 int stream_id, 188 int stream_id,
189 media::OutputDeviceStatus device_status, 189 media::OutputDeviceStatus device_status,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 media::AudioOutputIPCDelegate* delegate = delegates_.Lookup(stream_id); 227 media::AudioOutputIPCDelegate* delegate = delegates_.Lookup(stream_id);
228 if (!delegate) { 228 if (!delegate) {
229 DLOG(WARNING) << "Got OnStreamError() event for a non-existent or" 229 DLOG(WARNING) << "Got OnStreamError() event for a non-existent or"
230 << " removed audio renderer."; 230 << " removed audio renderer.";
231 return; 231 return;
232 } 232 }
233 delegate->OnError(); 233 delegate->OnError();
234 } 234 }
235 235
236 } // namespace content 236 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/audio_message_filter.h ('k') | content/renderer/media/renderer_webmediaplayer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698