| 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 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Returns the default request context for media resources associated with | 113 // Returns the default request context for media resources associated with |
| 114 // this context. | 114 // this context. |
| 115 // TODO(creis): Remove this version in favor of the one below. | 115 // TODO(creis): Remove this version in favor of the one below. |
| 116 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0; | 116 virtual net::URLRequestContextGetter* GetMediaRequestContext() = 0; |
| 117 | 117 |
| 118 // Returns the request context for media resources associated with this | 118 // Returns the request context for media resources associated with this |
| 119 // context and renderer process. | 119 // context and renderer process. |
| 120 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( | 120 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( |
| 121 int renderer_child_id) = 0; | 121 int renderer_child_id) = 0; |
| 122 | 122 |
| 123 // Returns the resource context. | 123 // Returns the appropriate ResourceContext for |instance|. |
| 124 virtual ResourceContext* GetResourceContext() = 0; | 124 virtual ResourceContext* GetResourceContext(SiteInstance* instance) = 0; |
| 125 | 125 |
| 126 // Returns the DownloadManagerDelegate for this context. This will be called | 126 // Returns the DownloadManagerDelegate for this context. This will be called |
| 127 // once per context. The embedder owns the delegate and is responsible for | 127 // once per context. The embedder owns the delegate and is responsible for |
| 128 // ensuring that it outlives DownloadManager. It's valid to return NULL. | 128 // ensuring that it outlives DownloadManager. It's valid to return NULL. |
| 129 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; | 129 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; |
| 130 | 130 |
| 131 // Returns the geolocation permission context for this context. It's valid to | 131 // Returns the geolocation permission context for this context. It's valid to |
| 132 // return NULL, in which case geolocation requests will always be allowed. | 132 // return NULL, in which case geolocation requests will always be allowed. |
| 133 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; | 133 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() = 0; |
| 134 | 134 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 154 struct hash<content::BrowserContext*> { | 154 struct hash<content::BrowserContext*> { |
| 155 std::size_t operator()(content::BrowserContext* const& p) const { | 155 std::size_t operator()(content::BrowserContext* const& p) const { |
| 156 return reinterpret_cast<std::size_t>(p); | 156 return reinterpret_cast<std::size_t>(p); |
| 157 } | 157 } |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace BASE_HASH_NAMESPACE | 160 } // namespace BASE_HASH_NAMESPACE |
| 161 #endif | 161 #endif |
| 162 | 162 |
| 163 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 163 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
| OLD | NEW |