| 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 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/supports_user_data.h" |
| 10 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 11 | 12 |
| 12 namespace fileapi { | 13 namespace fileapi { |
| 13 class FileSystemContext; | 14 class FileSystemContext; |
| 14 } | 15 } |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 class URLRequestContextGetter; | 18 class URLRequestContextGetter; |
| 18 } | 19 } |
| 19 | 20 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 namespace content { | 34 namespace content { |
| 34 | 35 |
| 35 class DownloadManager; | 36 class DownloadManager; |
| 36 class GeolocationPermissionContext; | 37 class GeolocationPermissionContext; |
| 37 class HostZoomMap; | 38 class HostZoomMap; |
| 38 class ResourceContext; | 39 class ResourceContext; |
| 39 class SpeechInputPreferences; | 40 class SpeechInputPreferences; |
| 40 | 41 |
| 41 // This class holds the context needed for a browsing session. | 42 // This class holds the context needed for a browsing session. |
| 42 // It lives on the UI thread. | 43 // It lives on the UI thread. |
| 43 class CONTENT_EXPORT BrowserContext { | 44 class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { |
| 44 public: | 45 public: |
| 45 virtual ~BrowserContext(); | 46 virtual ~BrowserContext() {} |
| 46 | 47 |
| 47 // Returns the path of the directory where this context's data is stored. | 48 // Returns the path of the directory where this context's data is stored. |
| 48 virtual FilePath GetPath() = 0; | 49 virtual FilePath GetPath() = 0; |
| 49 | 50 |
| 50 // Return whether this context is incognito. Default is false. | 51 // Return whether this context is incognito. Default is false. |
| 51 // This doesn't belong here; http://crbug.com/89628 | 52 // This doesn't belong here; http://crbug.com/89628 |
| 52 virtual bool IsOffTheRecord() = 0; | 53 virtual bool IsOffTheRecord() = 0; |
| 53 | 54 |
| 54 // Returns the DownloadManager associated with this context. | 55 // Returns the DownloadManager associated with this context. |
| 55 virtual content::DownloadManager* GetDownloadManager() = 0; | 56 virtual content::DownloadManager* GetDownloadManager() = 0; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 struct hash<content::BrowserContext*> { | 109 struct hash<content::BrowserContext*> { |
| 109 std::size_t operator()(content::BrowserContext* const& p) const { | 110 std::size_t operator()(content::BrowserContext* const& p) const { |
| 110 return reinterpret_cast<std::size_t>(p); | 111 return reinterpret_cast<std::size_t>(p); |
| 111 } | 112 } |
| 112 }; | 113 }; |
| 113 | 114 |
| 114 } // namespace BASE_HASH_NAMESPACE | 115 } // namespace BASE_HASH_NAMESPACE |
| 115 #endif | 116 #endif |
| 116 | 117 |
| 117 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 118 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |