| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // 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 | 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_BROWSER_RESOURCE_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_RESOURCE_CONTEXT_H_ |
| 6 #define CONTENT_BROWSER_RESOURCE_CONTEXT_H_ | 6 #define CONTENT_BROWSER_RESOURCE_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "content/common/content_export.h" |
| 13 | 14 |
| 14 class ChromeAppCacheService; | 15 class ChromeAppCacheService; |
| 15 class ChromeBlobStorageContext; | 16 class ChromeBlobStorageContext; |
| 16 class ExtensionInfoMap; | 17 class ExtensionInfoMap; |
| 17 class HostZoomMap; | 18 class HostZoomMap; |
| 18 class MediaObserver; | 19 class MediaObserver; |
| 19 namespace fileapi { | 20 namespace fileapi { |
| 20 class FileSystemContext; | 21 class FileSystemContext; |
| 21 } // namespace fileapi | 22 } // namespace fileapi |
| 22 namespace net { | 23 namespace net { |
| 23 class HostResolver; | 24 class HostResolver; |
| 24 class URLRequestContext; | 25 class URLRequestContext; |
| 25 } // namespace net | 26 } // namespace net |
| 26 namespace prerender { | 27 namespace prerender { |
| 27 class PrerenderManager; | 28 class PrerenderManager; |
| 28 } // namespace prerender | 29 } // namespace prerender |
| 29 namespace quota { | 30 namespace quota { |
| 30 class QuotaManager; | 31 class QuotaManager; |
| 31 }; // namespace quota | 32 }; // namespace quota |
| 32 namespace webkit_database { | 33 namespace webkit_database { |
| 33 class DatabaseTracker; | 34 class DatabaseTracker; |
| 34 } // namespace webkit_database | 35 } // namespace webkit_database |
| 35 | 36 |
| 36 namespace content { | 37 namespace content { |
| 37 | 38 |
| 38 // ResourceContext contains the relevant context information required for | 39 // ResourceContext contains the relevant context information required for |
| 39 // resource loading. It lives on the IO thread, although it is constructed on | 40 // resource loading. It lives on the IO thread, although it is constructed on |
| 40 // the UI thread. ResourceContext doesn't own anything it points to, it just | 41 // the UI thread. ResourceContext doesn't own anything it points to, it just |
| 41 // holds pointers to relevant objects to resource loading. | 42 // holds pointers to relevant objects to resource loading. |
| 42 class ResourceContext { | 43 class CONTENT_EXPORT ResourceContext { |
| 43 public: | 44 public: |
| 44 virtual ~ResourceContext(); | 45 virtual ~ResourceContext(); |
| 45 | 46 |
| 46 // The user data allows the clients to associate data with this request. | 47 // The user data allows the clients to associate data with this request. |
| 47 // Multiple user data values can be stored under different keys. | 48 // Multiple user data values can be stored under different keys. |
| 48 void* GetUserData(const void* key) const; | 49 void* GetUserData(const void* key) const; |
| 49 void SetUserData(const void* key, void* data); | 50 void SetUserData(const void* key, void* data); |
| 50 | 51 |
| 51 net::HostResolver* host_resolver() const; | 52 net::HostResolver* host_resolver() const; |
| 52 void set_host_resolver(net::HostResolver* host_resolver); | 53 void set_host_resolver(net::HostResolver* host_resolver); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // TODO(willchan): These don't belong in content/. Remove them eventually. | 111 // TODO(willchan): These don't belong in content/. Remove them eventually. |
| 111 | 112 |
| 112 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter_; | 113 base::Callback<prerender::PrerenderManager*(void)> prerender_manager_getter_; |
| 113 | 114 |
| 114 DISALLOW_COPY_AND_ASSIGN(ResourceContext); | 115 DISALLOW_COPY_AND_ASSIGN(ResourceContext); |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 } // namespace content | 118 } // namespace content |
| 118 | 119 |
| 119 #endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_ | 120 #endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_ |
| OLD | NEW |