OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 } | 937 } |
938 | 938 |
939 void FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction( | 939 void FrameLoaderClientImpl::dispatchDecidePolicyForNavigationAction( |
940 FramePolicyFunction function, | 940 FramePolicyFunction function, |
941 const NavigationAction& action, | 941 const NavigationAction& action, |
942 const ResourceRequest& request, | 942 const ResourceRequest& request, |
943 PassRefPtr<FormState> formState) { | 943 PassRefPtr<FormState> formState) { |
944 PolicyAction policyAction = PolicyIgnore; | 944 PolicyAction policyAction = PolicyIgnore; |
945 | 945 |
946 // It is valid for this function to be invoked in code paths where the | 946 // It is valid for this function to be invoked in code paths where the |
947 // the webview is closed. | 947 // webview is closed. |
948 // The null check here is to fix a crash that seems strange | 948 // The null check here is to fix a crash that seems strange |
949 // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). | 949 // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). |
950 if (m_webFrame->client() && !request.url().isNull()) { | 950 if (m_webFrame->client() && !request.url().isNull()) { |
951 WebNavigationPolicy navigationPolicy = WebNavigationPolicyCurrentTab; | 951 WebNavigationPolicy navigationPolicy = WebNavigationPolicyCurrentTab; |
952 actionSpecifiesNavigationPolicy(action, &navigationPolicy); | 952 actionSpecifiesNavigationPolicy(action, &navigationPolicy); |
953 | 953 |
954 // Give the delegate a chance to change the navigation policy. | 954 // Give the delegate a chance to change the navigation policy. |
955 const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); | 955 const WebDataSourceImpl* ds = m_webFrame->provisionalDataSourceImpl(); |
956 if (ds) { | 956 if (ds) { |
957 KURL url = ds->request().url(); | 957 KURL url = ds->request().url(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 webview->client()->didStopLoading(); | 1066 webview->client()->didStopLoading(); |
1067 } | 1067 } |
1068 | 1068 |
1069 void FrameLoaderClientImpl::setMainFrameDocumentReady(bool ready) | 1069 void FrameLoaderClientImpl::setMainFrameDocumentReady(bool ready) |
1070 { | 1070 { |
1071 // FIXME | 1071 // FIXME |
1072 } | 1072 } |
1073 | 1073 |
1074 // Creates a new connection and begins downloading from that (contrast this | 1074 // Creates a new connection and begins downloading from that (contrast this |
1075 // with |download|). | 1075 // with |download|). |
1076 void FrameLoaderClientImpl::startDownload(const ResourceRequest& request) | 1076 void FrameLoaderClientImpl::startDownload(const ResourceRequest& request, const
String& /* suggestedName */) |
1077 { | 1077 { |
1078 if (m_webFrame->client()) { | 1078 if (m_webFrame->client()) { |
1079 WrappedResourceRequest webreq(request); | 1079 WrappedResourceRequest webreq(request); |
1080 m_webFrame->client()->loadURLExternally( | 1080 m_webFrame->client()->loadURLExternally( |
1081 m_webFrame, webreq, WebNavigationPolicyDownload); | 1081 m_webFrame, webreq, WebNavigationPolicyDownload); |
1082 } | 1082 } |
1083 } | 1083 } |
1084 | 1084 |
1085 void FrameLoaderClientImpl::willChangeTitle(DocumentLoader*) | 1085 void FrameLoaderClientImpl::willChangeTitle(DocumentLoader*) |
1086 { | 1086 { |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 } | 1600 } |
1601 return ds->releasePluginLoadObserver(); | 1601 return ds->releasePluginLoadObserver(); |
1602 } | 1602 } |
1603 | 1603 |
1604 PassRefPtr<FrameNetworkingContext> FrameLoaderClientImpl::createNetworkingContex
t() | 1604 PassRefPtr<FrameNetworkingContext> FrameLoaderClientImpl::createNetworkingContex
t() |
1605 { | 1605 { |
1606 return FrameNetworkingContextImpl::create(m_webFrame->frame()); | 1606 return FrameNetworkingContextImpl::create(m_webFrame->frame()); |
1607 } | 1607 } |
1608 | 1608 |
1609 } // namespace WebKit | 1609 } // namespace WebKit |
OLD | NEW |