diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 16:44:39 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 16:44:39 +0000 |
commit | f6134ff2597f45c240b1fc2a493d38b51aa8a884 (patch) | |
tree | beddc103816d95a1f73a586eb523251154f84e6b /webkit/glue/alt_error_page_resource_fetcher.h | |
parent | 62c9a8e3985009ee3503497cb4e1ab18d8cecc97 (diff) | |
download | chromium_src-f6134ff2597f45c240b1fc2a493d38b51aa8a884.zip chromium_src-f6134ff2597f45c240b1fc2a493d38b51aa8a884.tar.gz chromium_src-f6134ff2597f45c240b1fc2a493d38b51aa8a884.tar.bz2 |
Modify ResourceFetcher to use WebURLLoader instead of ResourceHandle.
This is step 1 of moving ResourceFetcher usage out of WebFrame. This
CL adds a new method to WebFrame, named DispatchWillSendRequest, which
may be used to associate a WebURLRequest with the WebFrame. This
triggers the WebViewDelegate's WillSendRequest method among other things.
ResourceFetcher and friends have been modified to use callbacks instead
of delegates. I just find this approach a bit cleaner and easier to
work with.
BUG=15648
TEST=none
R=brettw
Review URL: http://codereview.chromium.org/149172
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/alt_error_page_resource_fetcher.h')
-rw-r--r-- | webkit/glue/alt_error_page_resource_fetcher.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/webkit/glue/alt_error_page_resource_fetcher.h b/webkit/glue/alt_error_page_resource_fetcher.h index 1f42892..0ca357b 100644 --- a/webkit/glue/alt_error_page_resource_fetcher.h +++ b/webkit/glue/alt_error_page_resource_fetcher.h @@ -7,12 +7,6 @@ #include <string> -#include "base/compiler_specific.h" - -MSVC_PUSH_WARNING_LEVEL(0); -#include "Timer.h" -MSVC_POP_WARNING(); - #include "base/scoped_ptr.h" #include "webkit/api/public/WebURLError.h" #include "webkit/api/public/WebURLRequest.h" @@ -22,24 +16,26 @@ class ResourceFetcherWithTimeout; class WebFrameImpl; class WebView; +namespace webkit_glue { + // Used for downloading alternate dns error pages. Once downloading is done // (or fails), the webview delegate is notified. -class AltErrorPageResourceFetcher : public ResourceFetcher::Delegate { +class AltErrorPageResourceFetcher { public: AltErrorPageResourceFetcher(WebView* web_view, + WebFrame* web_frame, const WebKit::WebURLError& web_error, - WebFrameImpl* web_frame, const GURL& url); ~AltErrorPageResourceFetcher(); - virtual void OnURLFetchComplete(const WebCore::ResourceResponse& response, - const std::string& data); - private: + void OnURLFetchComplete(const WebKit::WebURLResponse& response, + const std::string& data); + // References to our owners WebView* web_view_; + WebFrame* web_frame_; WebKit::WebURLError web_error_; - WebFrameImpl* web_frame_; WebKit::WebURLRequest failed_request_; // Does the actual fetching. @@ -48,4 +44,6 @@ class AltErrorPageResourceFetcher : public ResourceFetcher::Delegate { DISALLOW_COPY_AND_ASSIGN(AltErrorPageResourceFetcher); }; +} // namespace webkit_glue + #endif // WEBKIT_GLUE_ALT_ERROR_PAGE_RESOURCE_FETCHER_H__ |