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/browser/renderer_host/media/audio_input_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 } | 397 } |
398 | 398 |
399 AudioInputRendererHost::AudioEntry* AudioInputRendererHost::LookupByController( | 399 AudioInputRendererHost::AudioEntry* AudioInputRendererHost::LookupByController( |
400 media::AudioInputController* controller) { | 400 media::AudioInputController* controller) { |
401 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 401 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
402 | 402 |
403 // Iterate the map of entries. | 403 // Iterate the map of entries. |
404 // TODO(hclam): Implement a faster look up method. | 404 // TODO(hclam): Implement a faster look up method. |
405 for (AudioEntryMap::iterator i = audio_entries_.begin(); | 405 for (AudioEntryMap::iterator i = audio_entries_.begin(); |
406 i != audio_entries_.end(); ++i) { | 406 i != audio_entries_.end(); ++i) { |
407 if (controller == i->second->controller.get()) | 407 if (controller == i->second->controller) |
408 return i->second; | 408 return i->second; |
409 } | 409 } |
410 return NULL; | 410 return NULL; |
411 } | 411 } |
412 | 412 |
413 } // namespace content | 413 } // namespace content |
OLD | NEW |