summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 19:11:48 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 19:11:48 +0000
commitb086e8071269fc23c6fb9fef3785da4e41a1d82c (patch)
tree7948c405ee492caa137259e13c2f20e2ad5dedd7 /webkit/glue/webframe_impl.cc
parentafa82479fced750ebee50cba4ce94c23ba064ea6 (diff)
downloadchromium_src-b086e8071269fc23c6fb9fef3785da4e41a1d82c.zip
chromium_src-b086e8071269fc23c6fb9fef3785da4e41a1d82c.tar.gz
chromium_src-b086e8071269fc23c6fb9fef3785da4e41a1d82c.tar.bz2
Alt{Error,404}PageResourceFetcher cleanup.
This change modifies AltErrorPageResourceFetcher to use Callback so that we can eliminate Alt404PageResourceFetcher. This change also eliminates dependencies from AltErrorPageResourceFetcher on WebCore. BUG=15648 TEST=none R=tony Review URL: http://codereview.chromium.org/159262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index 4087a2a..ccd08f4 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -151,6 +151,7 @@ MSVC_POP_WARNING();
#include "webkit/api/public/WebRect.h"
#include "webkit/api/public/WebScriptSource.h"
#include "webkit/api/public/WebSize.h"
+#include "webkit/api/public/WebURLError.h"
#include "webkit/glue/alt_error_page_resource_fetcher.h"
#include "webkit/glue/chrome_client_impl.h"
#include "webkit/glue/dom_operations.h"
@@ -1563,7 +1564,8 @@ void WebFrameImpl::LoadAlternateHTMLErrorPage(const WebURLRequest& request,
replace);
alt_error_page_fetcher_.reset(new AltErrorPageResourceFetcher(
- GetWebViewImpl(), this, error, error_page_url));
+ error_page_url, this, error.unreachableURL,
+ NewCallback(this, &WebFrameImpl::AltErrorPageFinished)));
}
void WebFrameImpl::DispatchWillSendRequest(WebURLRequest* request) {
@@ -1843,3 +1845,13 @@ void WebFrameImpl::LoadJavaScriptURL(const KURL& url) {
frame_->loader()->end();
}
}
+
+void WebFrameImpl::AltErrorPageFinished(const GURL& unreachable_url,
+ const std::string& html) {
+ WebViewDelegate* d = GetWebViewImpl()->delegate();
+ if (!d)
+ return;
+ WebURLError error;
+ error.unreachableURL = unreachable_url;
+ d->LoadNavigationErrorPage(this, WebURLRequest(), error, html, true);
+}