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 // A wrapper around ResourceHandle and ResourceHandleClient that simplifies | 5 // A wrapper around ResourceHandle and ResourceHandleClient that simplifies |
6 // the download of an HTTP object. The interface is modeled after URLFetcher | 6 // the download of an HTTP object. The interface is modeled after URLFetcher |
7 // in the /chrome/browser. | 7 // in the /chrome/browser. |
8 // | 8 // |
9 // ResourceFetcher::Delegate::OnURLFetchComplete will be called async after | 9 // ResourceFetcher::Delegate::OnURLFetchComplete will be called async after |
10 // the ResourceFetcher object is created. | 10 // the ResourceFetcher object is created. |
11 | 11 |
12 #ifndef WEBKIT_GLUE_RESOURCE_FETCHER_H_ | 12 #ifndef WEBKIT_GLUE_RESOURCE_FETCHER_H_ |
13 #define WEBKIT_GLUE_RESOURCE_FETCHER_H_ | 13 #define WEBKIT_GLUE_RESOURCE_FETCHER_H_ |
14 | 14 |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "base/basictypes.h" | 17 #include "base/basictypes.h" |
18 #include "base/callback.h" | 18 #include "base/callback_old.h" |
19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
20 #include "base/timer.h" | 20 #include "base/timer.h" |
21 #include "googleurl/src/gurl.h" | 21 #include "googleurl/src/gurl.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" |
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" |
25 | 25 |
26 class GURL; | 26 class GURL; |
27 | 27 |
28 namespace WebKit { | 28 namespace WebKit { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // kill the request. | 121 // kill the request. |
122 void TimeoutFired(); | 122 void TimeoutFired(); |
123 | 123 |
124 // Limit how long we wait for the alternate error page server. | 124 // Limit how long we wait for the alternate error page server. |
125 base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_; | 125 base::OneShotTimer<ResourceFetcherWithTimeout> timeout_timer_; |
126 }; | 126 }; |
127 | 127 |
128 } // namespace webkit_glue | 128 } // namespace webkit_glue |
129 | 129 |
130 #endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_ | 130 #endif // WEBKIT_GLUE_RESOURCE_FETCHER_H_ |
OLD | NEW |