summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframeloaderclient_impl.cc
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 02:23:34 +0000
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-19 02:23:34 +0000
commit7b7a7dc7f3cd95ea98b990250540e91b6d6c2b85 (patch)
tree11ffe0c0a370a0690c3865a0e5756c46817f2426 /webkit/glue/webframeloaderclient_impl.cc
parentfa902b7c687b26a82f61b3a408c2ed6c4f7a3020 (diff)
downloadchromium_src-7b7a7dc7f3cd95ea98b990250540e91b6d6c2b85.zip
chromium_src-7b7a7dc7f3cd95ea98b990250540e91b6d6c2b85.tar.gz
chromium_src-7b7a7dc7f3cd95ea98b990250540e91b6d6c2b85.tar.bz2
Make LayoutTests/http/tests/misc/redirect-to-external-url.html PASS.
* Implement WebFrameLoaderClient::dispatchUnableToImplementPolicy() * Implement WebFrameLoaderClient::canHandleRequest() so that an unkown scheme makes ResourceError. - Introduce WebFrameClient::canHandleRequest() to avoid chrome:: dependency from webkit/glue. - Introduce WebFrameClient::cannotShowURLError() to keep transparency of WebURLError. * Introduce WebFrameClient::unableToImplementPolicyWithError() An implmentation in test_shell prints the message same as WebKit. BUG=24074 TEST=This change enables 1 test. Review URL: http://codereview.chromium.org/271087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframeloaderclient_impl.cc')
-rw-r--r--webkit/glue/webframeloaderclient_impl.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/webkit/glue/webframeloaderclient_impl.cc b/webkit/glue/webframeloaderclient_impl.cc
index 826625dd..3fe52c62 100644
--- a/webkit/glue/webframeloaderclient_impl.cc
+++ b/webkit/glue/webframeloaderclient_impl.cc
@@ -849,8 +849,11 @@ void WebFrameLoaderClient::cancelPolicyCheck() {
// FIXME
}
-void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const ResourceError&) {
- // FIXME
+void WebFrameLoaderClient::dispatchUnableToImplementPolicy(
+ const ResourceError& error) {
+ WebKit::WebURLError url_error =
+ webkit_glue::ResourceErrorToWebURLError(error);
+ webframe_->client()->unableToImplementPolicyWithError(webframe_, url_error);
}
void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function,
@@ -999,10 +1002,13 @@ ResourceError WebFrameLoaderClient::cancelledError(
return ResourceError(net::kErrorDomain, net::ERR_ABORTED,
request.url().string(), String());
}
-ResourceError WebFrameLoaderClient::cannotShowURLError(const ResourceRequest&) {
- // FIXME
- return ResourceError();
+
+ResourceError WebFrameLoaderClient::cannotShowURLError(
+ const ResourceRequest& request) {
+ return webkit_glue::WebURLErrorToResourceError(
+ webframe_->client()->cannotShowURLError(WrappedResourceRequest(request)));
}
+
ResourceError WebFrameLoaderClient::interruptForPolicyChangeError(
const ResourceRequest& request) {
return ResourceError(kInternalErrorDomain, ERR_POLICY_CHANGE,
@@ -1034,10 +1040,9 @@ bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error) {
return error.errorCode() != net::ERR_ABORTED;
}
-bool WebFrameLoaderClient::canHandleRequest(const ResourceRequest&) const {
- // FIXME: this appears to be used only by the context menu code to determine
- // if "open" should be displayed in the menu when clicking on a link.
- return true;
+bool WebFrameLoaderClient::canHandleRequest(
+ const ResourceRequest& request) const {
+ return webframe_->client()->canHandleRequest(WrappedResourceRequest(request));
}
bool WebFrameLoaderClient::canShowMIMEType(const String& mime_type) const {