Chromium Code Reviews| Index: content/browser/resource_context.cc |
| =================================================================== |
| --- content/browser/resource_context.cc (revision 113173) |
| +++ content/browser/resource_context.cc (working copy) |
| @@ -21,7 +21,9 @@ |
| quota_manager_(NULL), |
| host_zoom_map_(NULL), |
| media_observer_(NULL), |
| - media_stream_manager_(NULL) { |
| + download_id_factory_(NULL), |
| + media_stream_manager_(NULL), |
| + audio_manager_(NULL) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| } |
| @@ -158,6 +160,7 @@ |
| EnsureInitialized(); |
| return download_id_factory_; |
| } |
| + |
| void ResourceContext::set_download_id_factory( |
| DownloadIdFactory* download_id_factory) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| @@ -177,4 +180,18 @@ |
| media_stream_manager_ = media_stream_manager; |
| } |
| +AudioManager* ResourceContext::audio_manager() const { |
| + // The AudioManager isn't necessarily initialized with other |
|
willchan no longer on Chromium
2011/12/06 17:02:12
Can you explain this comment? When is AudioManager
tommi (sloooow) - chröme
2011/12/06 20:28:48
Sorry, this comment isn't correct. I must have for
willchan no longer on Chromium
2011/12/07 15:29:20
I see. While it's not strictly a problem, it's dif
|
| + // resource context variables, so if we already have one, we can still |
| + // delay initializing the other ones. |
| + if (!audio_manager_) |
| + EnsureInitialized(); |
| + return audio_manager_; |
| +} |
| + |
| +void ResourceContext::set_audio_manager(AudioManager* audio_manager) { |
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| + audio_manager_ = audio_manager; |
| +} |
| + |
| } // namespace content |