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

Side by Side Diff: content/shell/shell_browser_context.cc

Issue 9296041: Create Content API around HostZoomMap. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/test/test_browser_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "content/browser/appcache/chrome_appcache_service.h" 13 #include "content/browser/appcache/chrome_appcache_service.h"
14 #include "content/browser/chrome_blob_storage_context.h" 14 #include "content/browser/chrome_blob_storage_context.h"
15 #include "content/browser/download/download_manager_impl.h" 15 #include "content/browser/download/download_manager_impl.h"
16 #include "content/browser/download/download_status_updater.h" 16 #include "content/browser/download/download_status_updater.h"
17 #include "content/browser/file_system/browser_file_system_helper.h" 17 #include "content/browser/file_system/browser_file_system_helper.h"
18 #include "content/browser/host_zoom_map.h" 18 #include "content/browser/host_zoom_map_impl.h"
19 #include "content/browser/in_process_webkit/webkit_context.h" 19 #include "content/browser/in_process_webkit/webkit_context.h"
20 #include "content/browser/speech/speech_input_preferences.h" 20 #include "content/browser/speech/speech_input_preferences.h"
21 #include "content/browser/ssl/ssl_host_state.h" 21 #include "content/browser/ssl/ssl_host_state.h"
22 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
23 #include "content/public/browser/geolocation_permission_context.h" 23 #include "content/public/browser/geolocation_permission_context.h"
24 #include "content/shell/shell_browser_main.h" 24 #include "content/shell/shell_browser_main.h"
25 #include "content/shell/shell_download_manager_delegate.h" 25 #include "content/shell/shell_download_manager_delegate.h"
26 #include "content/shell/shell_resource_context.h" 26 #include "content/shell/shell_resource_context.h"
27 #include "content/shell/shell_url_request_context_getter.h" 27 #include "content/shell/shell_url_request_context_getter.h"
28 #include "webkit/database/database_tracker.h" 28 #include "webkit/database/database_tracker.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()));
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_ = new HostZoomMap(); 184 host_zoom_map_ = HostZoomMap::Create();
185 return host_zoom_map_.get(); 185 return host_zoom_map_.get();
186 } 186 }
187 187
188 GeolocationPermissionContext* 188 GeolocationPermissionContext*
189 ShellBrowserContext::GetGeolocationPermissionContext() { 189 ShellBrowserContext::GetGeolocationPermissionContext() {
190 if (!geolocation_permission_context_) { 190 if (!geolocation_permission_context_) {
191 geolocation_permission_context_ = 191 geolocation_permission_context_ =
192 new ShellGeolocationPermissionContext(); 192 new ShellGeolocationPermissionContext();
193 } 193 }
194 return geolocation_permission_context_; 194 return geolocation_permission_context_;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } // namespace content 276 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/test/test_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698