summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframeloaderclient_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 17:12:55 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 17:12:55 +0000
commite6f546c3ab626d39d375376890b7f4bfef92f48e (patch)
treecbf7b1218db462116ea45f8536ee0900cb1f9ea6 /webkit/glue/webframeloaderclient_impl.cc
parent0e2dc851dc1ba72d849d22eba47ea053b2721916 (diff)
downloadchromium_src-e6f546c3ab626d39d375376890b7f4bfef92f48e.zip
chromium_src-e6f546c3ab626d39d375376890b7f4bfef92f48e.tar.gz
chromium_src-e6f546c3ab626d39d375376890b7f4bfef92f48e.tar.bz2
Add Reload and LoadData methods to WebFrame. LoadData replaces
LoadAlternateHTMLString, changing types to WebKit API types and allowing for more flexibility (supports loading non-HTML data). LoadHTMLString is modified to support some optional parameters. Note: Since WebFrame is going to soon be part of the WebKit API, it is OK style-wise for it to use optional parameters. This patch also includes a change to remove the securityInfo property from WebURLRequest. I did this so that I could eliminate the need to pass a WebURLRequest to LoadData / LoadHTMLString. This also fixes a TODO of mine to eliminate this field on WebCore::ResourceRequest since securityInfo (SSL cert info) is really more of a response property. It was only part of the request as a hack to support certain error pages. I work around that by leveraging NavigationState in chrome/renderer. I added some templatized, implicit constructors to WebData for convenience. I plan to make similar changes to WebCString and WebString in a future CL. This CL is a incremental step toward moving ResourceFetcher out of WebFrame. BUG=15648 TEST=none R=dglazkov Review URL: http://codereview.chromium.org/150146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframeloaderclient_impl.cc')
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index c886b80..e99813e 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -67,9 +67,13 @@ MSVC_POP_WARNING();
#include "webkit/glue/webview_impl.h"
using namespace WebCore;
+
using base::Time;
using base::TimeDelta;
+
+using WebKit::WebData;
using WebKit::WebNavigationType;
+using WebKit::WebString;
using WebKit::WebURL;
using WebKit::WebVector;
using WebKit::WrappedResourceRequest;
@@ -360,14 +364,14 @@ GURL WebFrameLoaderClient::GetAlt404PageUrl(DocumentLoader* loader) {
void WebFrameLoaderClient::Alt404PageFinished(DocumentLoader* loader,
const std::string& html) {
+ const WebURL& base_url = webkit_glue::KURLToWebURL(loader->url());
if (html.length() > 0) {
// TODO(tc): Handle backoff on so we don't hammer the alt error page
// servers.
- webframe_->LoadHTMLString(html, webkit_glue::KURLToGURL(loader->url()));
+ webframe_->LoadHTMLString(html, base_url);
} else {
// Fall back on original text
- webframe_->LoadHTMLString(postponed_data_,
- webkit_glue::KURLToGURL(loader->url()));
+ webframe_->LoadHTMLString(postponed_data_, base_url);
}
}