| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_renderer_host.h" | 5 #include "content/browser/renderer_host/media/audio_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" |
| 11 #include "content/browser/renderer_host/media/audio_common.h" | 11 #include "content/browser/renderer_host/media/audio_common.h" |
| 12 #include "content/browser/renderer_host/media/audio_sync_reader.h" | 12 #include "content/browser/renderer_host/media/audio_sync_reader.h" |
| 13 #include "content/browser/renderer_host/media/media_observer.h" | 13 #include "content/browser/renderer_host/media/media_observer.h" |
| 14 #include "content/browser/resource_context.h" | 14 #include "content/browser/resource_context.h" |
| 15 #include "content/common/media/audio_messages.h" | 15 #include "content/common/media/audio_messages.h" |
| 16 #include "media/audio/audio_util.h" | 16 #include "media/audio/audio_util.h" |
| 17 #include "ipc/ipc_logging.h" | 17 #include "ipc/ipc_logging.h" |
| 18 | 18 |
| 19 using content::BrowserMessageFilter; |
| 19 using content::BrowserThread; | 20 using content::BrowserThread; |
| 20 | 21 |
| 21 AudioRendererHost::AudioEntry::AudioEntry() | 22 AudioRendererHost::AudioEntry::AudioEntry() |
| 22 : stream_id(0), | 23 : stream_id(0), |
| 23 pending_buffer_request(false), | 24 pending_buffer_request(false), |
| 24 pending_close(false) { | 25 pending_close(false) { |
| 25 } | 26 } |
| 26 | 27 |
| 27 AudioRendererHost::AudioEntry::~AudioEntry() {} | 28 AudioRendererHost::AudioEntry::~AudioEntry() {} |
| 28 | 29 |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 } | 465 } |
| 465 return NULL; | 466 return NULL; |
| 466 } | 467 } |
| 467 | 468 |
| 468 MediaObserver* AudioRendererHost::media_observer() { | 469 MediaObserver* AudioRendererHost::media_observer() { |
| 469 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 470 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 470 if (!media_observer_) | 471 if (!media_observer_) |
| 471 media_observer_ = resource_context_->media_observer(); | 472 media_observer_ = resource_context_->media_observer(); |
| 472 return media_observer_; | 473 return media_observer_; |
| 473 } | 474 } |
| OLD | NEW |