blob: dafba7b27bf7d6d9d2ac7d4e05c5431a1f7e4e43 [file] [log] [blame]
[email protected]b0f146f2011-09-15 22:14:251// 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
3// found in the LICENSE file.
4
5#ifndef CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_
6#define CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_
7#pragma once
8
9#include "base/compiler_specific.h"
[email protected]e99ca5112011-09-26 17:22:5410#include "base/file_path.h"
[email protected]b0f146f2011-09-15 22:14:2511#include "base/memory/ref_counted.h"
12#include "base/memory/scoped_ptr.h"
[email protected]ccb797302011-12-15 16:55:1113#include "content/public/browser/browser_context.h"
[email protected]b0f146f2011-09-15 22:14:2514
[email protected]2909e342011-10-29 00:46:5315class DownloadIdFactory;
[email protected]b0f146f2011-09-15 22:14:2516class DownloadManager;
[email protected]b0f146f2011-09-15 22:14:2517class DownloadStatusUpdater;
18class GeolocationPermissionContext;
19class HostZoomMap;
20class SSLHostState;
21
22namespace content {
23
[email protected]1bd0ef12011-10-20 05:24:1724class DownloadManagerDelegate;
[email protected]b0f146f2011-09-15 22:14:2525class ResourceContext;
26class ShellBrowserMainParts;
[email protected]98d6f152011-09-29 19:35:5127class ShellDownloadManagerDelegate;
[email protected]b0f146f2011-09-15 22:14:2528
29class ShellBrowserContext : public BrowserContext {
30 public:
31 explicit ShellBrowserContext(ShellBrowserMainParts* shell_main_parts);
32 virtual ~ShellBrowserContext();
33
34 // BrowserContext implementation.
35 virtual FilePath GetPath() OVERRIDE;
36 virtual bool IsOffTheRecord() OVERRIDE;
37 virtual SSLHostState* GetSSLHostState() OVERRIDE;
38 virtual DownloadManager* GetDownloadManager() OVERRIDE;
[email protected]b0f146f2011-09-15 22:14:2539 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
40 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
41 int renderer_child_id) OVERRIDE;
42 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE;
43 virtual const ResourceContext& GetResourceContext() OVERRIDE;
44 virtual HostZoomMap* GetHostZoomMap() OVERRIDE;
45 virtual GeolocationPermissionContext*
46 GetGeolocationPermissionContext() OVERRIDE;
[email protected]8238dd62011-09-29 15:13:0147 virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE;
[email protected]b0f146f2011-09-15 22:14:2548 virtual bool DidLastSessionExitCleanly() OVERRIDE;
49 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE;
50 virtual WebKitContext* GetWebKitContext() OVERRIDE;
51 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE;
52 virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE;
53 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE;
54 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE;
55
56 private:
57 void CreateQuotaManagerAndClients();
58
[email protected]e99ca5112011-09-26 17:22:5459 FilePath path_;
[email protected]b0f146f2011-09-15 22:14:2560 scoped_ptr<ResourceContext> resource_context_;
61 scoped_ptr<SSLHostState> ssl_host_state_;
62 scoped_ptr<DownloadStatusUpdater> download_status_updater_;
[email protected]98d6f152011-09-29 19:35:5163 scoped_refptr<ShellDownloadManagerDelegate> download_manager_delegate_;
[email protected]2909e342011-10-29 00:46:5364 scoped_refptr<DownloadIdFactory> download_id_factory_;
[email protected]b0f146f2011-09-15 22:14:2565 scoped_refptr<DownloadManager> download_manager_;
66 scoped_refptr<net::URLRequestContextGetter> url_request_getter_;
67 scoped_refptr<HostZoomMap> host_zoom_map_;
68 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_;
[email protected]8238dd62011-09-29 15:13:0169 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
[email protected]b0f146f2011-09-15 22:14:2570 scoped_refptr<WebKitContext> webkit_context_;
71 scoped_refptr<ChromeAppCacheService> appcache_service_;
72 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
73 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
74 scoped_refptr<quota::QuotaManager> quota_manager_;
75 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_;
76
77 ShellBrowserMainParts* shell_main_parts_;
78
79 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext);
80};
81
82} // namespace content
83
84#endif // CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_