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/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Returns the request context appropriate for the given renderer. If the | 94 // Returns the request context appropriate for the given renderer. If the |
95 // renderer process doesn't have an associated installed app, or if the | 95 // renderer process doesn't have an associated installed app, or if the |
96 // installed app's is_storage_isolated() returns false, this is equivalent to | 96 // installed app's is_storage_isolated() returns false, this is equivalent to |
97 // calling GetRequestContext(). | 97 // calling GetRequestContext(). |
98 // TODO(creis): After isolated app storage is no longer an experimental | 98 // TODO(creis): After isolated app storage is no longer an experimental |
99 // feature, consider making this the default contract for GetRequestContext. | 99 // feature, consider making this the default contract for GetRequestContext. |
100 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 100 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
101 int renderer_child_id) = 0; | 101 int renderer_child_id) = 0; |
102 | 102 |
103 // Returns the request context for media resources associated with this | 103 // Returns the request context for media resources associated with this |
| 104 // context and renderer process. Pass -1 for the default media request |
104 // context. | 105 // context. |
105 virtual net::URLRequestContextGetter* GetRequestContextForMedia() = 0; | 106 virtual net::URLRequestContextGetter* GetRequestContextForMedia( |
| 107 int renderer_child_id) = 0; |
106 | 108 |
107 // Returns the resource context. | 109 // Returns the resource context. |
108 virtual ResourceContext* GetResourceContext() = 0; | 110 virtual ResourceContext* GetResourceContext() = 0; |
109 | 111 |
110 // Returns the DownloadManagerDelegate for this context. This will be called | 112 // Returns the DownloadManagerDelegate for this context. This will be called |
111 // once per context. The embedder owns the delegate and is responsible for | 113 // once per context. The embedder owns the delegate and is responsible for |
112 // ensuring that it outlives DownloadManager. It's valid to return NULL. | 114 // ensuring that it outlives DownloadManager. It's valid to return NULL. |
113 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; | 115 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() = 0; |
114 | 116 |
115 // Returns the geolocation permission context for this context. It's valid to | 117 // Returns the geolocation permission context for this context. It's valid to |
(...skipping 22 matching lines...) Expand all Loading... |
138 struct hash<content::BrowserContext*> { | 140 struct hash<content::BrowserContext*> { |
139 std::size_t operator()(content::BrowserContext* const& p) const { | 141 std::size_t operator()(content::BrowserContext* const& p) const { |
140 return reinterpret_cast<std::size_t>(p); | 142 return reinterpret_cast<std::size_t>(p); |
141 } | 143 } |
142 }; | 144 }; |
143 | 145 |
144 } // namespace BASE_HASH_NAMESPACE | 146 } // namespace BASE_HASH_NAMESPACE |
145 #endif | 147 #endif |
146 | 148 |
147 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ | 149 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CONTEXT_H_ |
OLD | NEW |