Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1509)

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 271087: LTTF: Implement WebFrameLoaderClient::dispatchUnableToImplementPolicy() and so on (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include "config.h" 5 #include "config.h"
6 6
7 #include "Chrome.h" 7 #include "Chrome.h"
8 #include "CString.h" 8 #include "CString.h"
9 #include "Document.h" 9 #include "Document.h"
10 #include "DocumentLoader.h" 10 #include "DocumentLoader.h"
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 } 842 }
843 } 843 }
844 844
845 (webframe_->frame()->loader()->policyChecker()->*function)(policy_action); 845 (webframe_->frame()->loader()->policyChecker()->*function)(policy_action);
846 } 846 }
847 847
848 void WebFrameLoaderClient::cancelPolicyCheck() { 848 void WebFrameLoaderClient::cancelPolicyCheck() {
849 // FIXME 849 // FIXME
850 } 850 }
851 851
852 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(const ResourceError&) { 852 void WebFrameLoaderClient::dispatchUnableToImplementPolicy(
853 // FIXME 853 const ResourceError& error) {
854 WebKit::WebURLError url_error =
855 webkit_glue::ResourceErrorToWebURLError(error);
856 webframe_->client()->unableToImplementPolicyWithError(webframe_, url_error);
854 } 857 }
855 858
856 void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function, 859 void WebFrameLoaderClient::dispatchWillSubmitForm(FramePolicyFunction function,
857 PassRefPtr<FormState> form_ref) { 860 PassRefPtr<FormState> form_ref) {
858 if (webframe_->client()) { 861 if (webframe_->client()) {
859 webframe_->client()->willSubmitForm( 862 webframe_->client()->willSubmitForm(
860 webframe_, webkit_glue::HTMLFormElementToWebForm(form_ref->form())); 863 webframe_, webkit_glue::HTMLFormElementToWebForm(form_ref->form()));
861 } 864 }
862 (webframe_->frame()->loader()->policyChecker()->*function)(PolicyUse); 865 (webframe_->frame()->loader()->policyChecker()->*function)(PolicyUse);
863 } 866 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 ResourceError WebFrameLoaderClient::blockedError(const WebCore::ResourceRequest& ) { 995 ResourceError WebFrameLoaderClient::blockedError(const WebCore::ResourceRequest& ) {
993 // FIXME 996 // FIXME
994 return ResourceError(); 997 return ResourceError();
995 } 998 }
996 999
997 ResourceError WebFrameLoaderClient::cancelledError( 1000 ResourceError WebFrameLoaderClient::cancelledError(
998 const ResourceRequest& request) { 1001 const ResourceRequest& request) {
999 return ResourceError(net::kErrorDomain, net::ERR_ABORTED, 1002 return ResourceError(net::kErrorDomain, net::ERR_ABORTED,
1000 request.url().string(), String()); 1003 request.url().string(), String());
1001 } 1004 }
1002 ResourceError WebFrameLoaderClient::cannotShowURLError(const ResourceRequest&) { 1005
1003 // FIXME 1006 ResourceError WebFrameLoaderClient::cannotShowURLError(
1004 return ResourceError(); 1007 const ResourceRequest& request) {
1008 return webkit_glue::WebURLErrorToResourceError(
1009 webframe_->client()->cannotShowURLError(WrappedResourceRequest(request)));
1005 } 1010 }
1011
1006 ResourceError WebFrameLoaderClient::interruptForPolicyChangeError( 1012 ResourceError WebFrameLoaderClient::interruptForPolicyChangeError(
1007 const ResourceRequest& request) { 1013 const ResourceRequest& request) {
1008 return ResourceError(kInternalErrorDomain, ERR_POLICY_CHANGE, 1014 return ResourceError(kInternalErrorDomain, ERR_POLICY_CHANGE,
1009 request.url().string(), String()); 1015 request.url().string(), String());
1010 } 1016 }
1011 1017
1012 ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const ResourceRespon se&) { 1018 ResourceError WebFrameLoaderClient::cannotShowMIMETypeError(const ResourceRespon se&) {
1013 // FIXME 1019 // FIXME
1014 return ResourceError(); 1020 return ResourceError();
1015 } 1021 }
(...skipping 11 matching lines...) Expand all
1027 bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error) { 1033 bool WebFrameLoaderClient::shouldFallBack(const ResourceError& error) {
1028 // This method is called when we fail to load the URL for an <object> tag 1034 // This method is called when we fail to load the URL for an <object> tag
1029 // that has fallback content (child elements) and is being loaded as a frame. 1035 // that has fallback content (child elements) and is being loaded as a frame.
1030 // The error parameter indicates the reason for the load failure. 1036 // The error parameter indicates the reason for the load failure.
1031 // We should let the fallback content load only if this wasn't a cancelled 1037 // We should let the fallback content load only if this wasn't a cancelled
1032 // request. 1038 // request.
1033 // Note: The mac version also has a case for "WebKitErrorPluginWillHandleLoad" 1039 // Note: The mac version also has a case for "WebKitErrorPluginWillHandleLoad"
1034 return error.errorCode() != net::ERR_ABORTED; 1040 return error.errorCode() != net::ERR_ABORTED;
1035 } 1041 }
1036 1042
1037 bool WebFrameLoaderClient::canHandleRequest(const ResourceRequest&) const { 1043 bool WebFrameLoaderClient::canHandleRequest(
1038 // FIXME: this appears to be used only by the context menu code to determine 1044 const ResourceRequest& request) const {
1039 // if "open" should be displayed in the menu when clicking on a link. 1045 return webframe_->client()->canHandleRequest(WrappedResourceRequest(request));
1040 return true;
1041 } 1046 }
1042 1047
1043 bool WebFrameLoaderClient::canShowMIMEType(const String& mime_type) const { 1048 bool WebFrameLoaderClient::canShowMIMEType(const String& mime_type) const {
1044 // This method is called to determine if the media type can be shown 1049 // This method is called to determine if the media type can be shown
1045 // "internally" (i.e. inside the browser) regardless of whether or not the 1050 // "internally" (i.e. inside the browser) regardless of whether or not the
1046 // browser or a plugin is doing the rendering. 1051 // browser or a plugin is doing the rendering.
1047 1052
1048 // mime_type strings are supposed to be ASCII, but if they are not for some 1053 // mime_type strings are supposed to be ASCII, but if they are not for some
1049 // reason, then it just means that the mime type will fail all of these "is 1054 // reason, then it just means that the mime type will fail all of these "is
1050 // supported" checks and go down the path of an unhandled mime type. 1055 // supported" checks and go down the path of an unhandled mime type.
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 WebViewImpl* webview = webframe_->GetWebViewImpl(); 1316 WebViewImpl* webview = webframe_->GetWebViewImpl();
1312 if (webview->client()) 1317 if (webview->client())
1313 webview->client()->navigateBackForwardSoon(offset); 1318 webview->client()->navigateBackForwardSoon(offset);
1314 } 1319 }
1315 1320
1316 PassOwnPtr<WebPluginLoadObserver> WebFrameLoaderClient::GetPluginLoadObserver() { 1321 PassOwnPtr<WebPluginLoadObserver> WebFrameLoaderClient::GetPluginLoadObserver() {
1317 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader( 1322 WebDataSourceImpl* ds = WebDataSourceImpl::fromDocumentLoader(
1318 webframe_->frame()->loader()->activeDocumentLoader()); 1323 webframe_->frame()->loader()->activeDocumentLoader());
1319 return ds->releasePluginLoadObserver(); 1324 return ds->releasePluginLoadObserver();
1320 } 1325 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698