| 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 WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
| 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
| 10 #include "webkit/browser/appcache/appcache_entry.h" | 10 #include "webkit/browser/appcache/appcache_entry.h" |
| 11 #include "webkit/browser/appcache/appcache_host.h" | 11 #include "webkit/browser/appcache/appcache_host.h" |
| 12 #include "webkit/browser/webkit_storage_browser_export.h" |
| 12 #include "webkit/glue/resource_type.h" | 13 #include "webkit/glue/resource_type.h" |
| 13 #include "webkit/storage/webkit_storage_export.h" | |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 class NetworkDelegate; | 16 class NetworkDelegate; |
| 17 class URLRequest; | 17 class URLRequest; |
| 18 class URLRequestJob; | 18 class URLRequestJob; |
| 19 } // namespace net | 19 } // namespace net |
| 20 | 20 |
| 21 namespace appcache { | 21 namespace appcache { |
| 22 | 22 |
| 23 class AppCacheURLRequestJob; | 23 class AppCacheURLRequestJob; |
| 24 | 24 |
| 25 // An instance is created for each net::URLRequest. The instance survives all | 25 // An instance is created for each net::URLRequest. The instance survives all |
| 26 // http transactions involved in the processing of its net::URLRequest, and is | 26 // http transactions involved in the processing of its net::URLRequest, and is |
| 27 // given the opportunity to hijack the request along the way. Callers | 27 // given the opportunity to hijack the request along the way. Callers |
| 28 // should use AppCacheHost::CreateRequestHandler to manufacture instances | 28 // should use AppCacheHost::CreateRequestHandler to manufacture instances |
| 29 // that can retrieve resources for a particular host. | 29 // that can retrieve resources for a particular host. |
| 30 class WEBKIT_STORAGE_EXPORT AppCacheRequestHandler | 30 class WEBKIT_STORAGE_BROWSER_EXPORT AppCacheRequestHandler |
| 31 : public base::SupportsUserData::Data, | 31 : public base::SupportsUserData::Data, |
| 32 public AppCacheHost::Observer, | 32 public AppCacheHost::Observer, |
| 33 public AppCacheStorage::Delegate { | 33 public AppCacheStorage::Delegate { |
| 34 public: | 34 public: |
| 35 virtual ~AppCacheRequestHandler(); | 35 virtual ~AppCacheRequestHandler(); |
| 36 | 36 |
| 37 // These are called on each request intercept opportunity. | 37 // These are called on each request intercept opportunity. |
| 38 AppCacheURLRequestJob* MaybeLoadResource( | 38 AppCacheURLRequestJob* MaybeLoadResource( |
| 39 net::URLRequest* request, net::NetworkDelegate* network_delegate); | 39 net::URLRequest* request, net::NetworkDelegate* network_delegate); |
| 40 AppCacheURLRequestJob* MaybeLoadFallbackForRedirect( | 40 AppCacheURLRequestJob* MaybeLoadFallbackForRedirect( |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // The job we use to deliver a response. | 131 // The job we use to deliver a response. |
| 132 scoped_refptr<AppCacheURLRequestJob> job_; | 132 scoped_refptr<AppCacheURLRequestJob> job_; |
| 133 | 133 |
| 134 friend class AppCacheRequestHandlerTest; | 134 friend class AppCacheRequestHandlerTest; |
| 135 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); | 135 DISALLOW_COPY_AND_ASSIGN(AppCacheRequestHandler); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace appcache | 138 } // namespace appcache |
| 139 | 139 |
| 140 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ | 140 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_REQUEST_HANDLER_H_ |
| OLD | NEW |