| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 | 10 |
| (...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 next_navigation_policy_ = navigation_policy; | 922 next_navigation_policy_ = navigation_policy; |
| 923 } | 923 } |
| 924 (webframe_->frame()->loader()->*function)(policy_action); | 924 (webframe_->frame()->loader()->*function)(policy_action); |
| 925 } | 925 } |
| 926 | 926 |
| 927 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction( | 927 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction( |
| 928 WebCore::FramePolicyFunction function, | 928 WebCore::FramePolicyFunction function, |
| 929 const WebCore::NavigationAction& action, | 929 const WebCore::NavigationAction& action, |
| 930 const WebCore::ResourceRequest& request, | 930 const WebCore::ResourceRequest& request, |
| 931 PassRefPtr<WebCore::FormState> form_state) { | 931 PassRefPtr<WebCore::FormState> form_state) { |
| 932 PolicyAction policy_action = PolicyUse; | 932 PolicyAction policy_action = PolicyIgnore; |
| 933 | 933 |
| 934 WebViewImpl* wv = webframe_->GetWebViewImpl(); | 934 WebViewImpl* wv = webframe_->GetWebViewImpl(); |
| 935 WebViewDelegate* d = wv->delegate(); | 935 WebViewDelegate* d = wv->delegate(); |
| 936 // It is valid for this function to be invoked in code paths where the | 936 // It is valid for this function to be invoked in code paths where the |
| 937 // the webview is closed. | 937 // the webview is closed. |
| 938 // The NULL check here is to fix a crash that seems strange | 938 // The NULL check here is to fix a crash that seems strange |
| 939 // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). | 939 // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). |
| 940 if (d && !request.url().isNull()) { | 940 if (d && !request.url().isNull()) { |
| 941 WebNavigationPolicy navigation_policy = | 941 WebNavigationPolicy navigation_policy = |
| 942 WebKit::WebNavigationPolicyCurrentTab; | 942 WebKit::WebNavigationPolicyCurrentTab; |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 | 1536 |
| 1537 std::string offset_str = url.ExtractFileName(); | 1537 std::string offset_str = url.ExtractFileName(); |
| 1538 int offset; | 1538 int offset; |
| 1539 if (!StringToInt(offset_str, &offset)) | 1539 if (!StringToInt(offset_str, &offset)) |
| 1540 return; | 1540 return; |
| 1541 | 1541 |
| 1542 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); | 1542 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); |
| 1543 if (d) | 1543 if (d) |
| 1544 d->NavigateBackForwardSoon(offset); | 1544 d->NavigateBackForwardSoon(offset); |
| 1545 } | 1545 } |
| OLD | NEW |