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/shell/shell_browser_context.h" | 5 #include "content/shell/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 net::URLRequestContextGetter* | 168 net::URLRequestContextGetter* |
169 ShellBrowserContext::GetRequestContextForMedia() { | 169 ShellBrowserContext::GetRequestContextForMedia() { |
170 return GetRequestContext(); | 170 return GetRequestContext(); |
171 } | 171 } |
172 | 172 |
173 const ResourceContext& ShellBrowserContext::GetResourceContext() { | 173 const ResourceContext& ShellBrowserContext::GetResourceContext() { |
174 if (!resource_context_.get()) { | 174 if (!resource_context_.get()) { |
175 resource_context_.reset(new ShellResourceContext( | 175 resource_context_.reset(new ShellResourceContext( |
176 static_cast<ShellURLRequestContextGetter*>(GetRequestContext()), | 176 static_cast<ShellURLRequestContextGetter*>(GetRequestContext()), |
177 GetBlobStorageContext())); | 177 GetBlobStorageContext(), GetAudioManager())); |
178 } | 178 } |
179 return *resource_context_.get(); | 179 return *resource_context_.get(); |
180 } | 180 } |
181 | 181 |
182 HostZoomMap* ShellBrowserContext::GetHostZoomMap() { | 182 HostZoomMap* ShellBrowserContext::GetHostZoomMap() { |
183 if (!host_zoom_map_) | 183 if (!host_zoom_map_) |
184 host_zoom_map_ = HostZoomMap::Create(); | 184 host_zoom_map_ = HostZoomMap::Create(); |
185 return host_zoom_map_.get(); | 185 return host_zoom_map_.get(); |
186 } | 186 } |
187 | 187 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 BrowserThread::IO, FROM_HERE, | 266 BrowserThread::IO, FROM_HERE, |
267 base::Bind( | 267 base::Bind( |
268 &ChromeAppCacheService::InitializeOnIOThread, | 268 &ChromeAppCacheService::InitializeOnIOThread, |
269 appcache_service_.get(), | 269 appcache_service_.get(), |
270 IsOffTheRecord() | 270 IsOffTheRecord() |
271 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), | 271 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), |
272 &GetResourceContext(), | 272 &GetResourceContext(), |
273 special_storage_policy)); | 273 special_storage_policy)); |
274 } | 274 } |
275 | 275 |
| 276 AudioManager* ShellBrowserContext::GetAudioManager() { |
| 277 if (!audio_manager_.get()) |
| 278 audio_manager_ = AudioManager::Create(); |
| 279 return audio_manager_; |
| 280 } |
| 281 |
276 } // namespace content | 282 } // namespace content |
OLD | NEW |