| OLD | NEW |
| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "Chrome.h" | 10 #include "Chrome.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 next_navigation_policy_ = navigation_policy; | 820 next_navigation_policy_ = navigation_policy; |
| 821 } | 821 } |
| 822 (webframe_->frame()->loader()->*function)(policy_action); | 822 (webframe_->frame()->loader()->*function)(policy_action); |
| 823 } | 823 } |
| 824 | 824 |
| 825 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction( | 825 void WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction( |
| 826 WebCore::FramePolicyFunction function, | 826 WebCore::FramePolicyFunction function, |
| 827 const WebCore::NavigationAction& action, | 827 const WebCore::NavigationAction& action, |
| 828 const WebCore::ResourceRequest& request, | 828 const WebCore::ResourceRequest& request, |
| 829 PassRefPtr<WebCore::FormState> form_state) { | 829 PassRefPtr<WebCore::FormState> form_state) { |
| 830 PolicyAction policy_action = PolicyUse; | 830 PolicyAction policy_action = PolicyIgnore; |
| 831 | 831 |
| 832 WebViewImpl* wv = webframe_->GetWebViewImpl(); | 832 WebViewImpl* wv = webframe_->GetWebViewImpl(); |
| 833 WebViewDelegate* d = wv->delegate(); | 833 WebViewDelegate* d = wv->delegate(); |
| 834 // It is valid for this function to be invoked in code paths where the | 834 // It is valid for this function to be invoked in code paths where the |
| 835 // the webview is closed. | 835 // the webview is closed. |
| 836 // The NULL check here is to fix a crash that seems strange | 836 // The NULL check here is to fix a crash that seems strange |
| 837 // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). | 837 // (see - https://bugs.webkit.org/show_bug.cgi?id=23554). |
| 838 if (d && !request.url().isNull()) { | 838 if (d && !request.url().isNull()) { |
| 839 WebNavigationPolicy navigation_policy = | 839 WebNavigationPolicy navigation_policy = |
| 840 WebKit::WebNavigationPolicyCurrentTab; | 840 WebKit::WebNavigationPolicyCurrentTab; |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 | 1428 |
| 1429 std::string offset_str = url.ExtractFileName(); | 1429 std::string offset_str = url.ExtractFileName(); |
| 1430 int offset; | 1430 int offset; |
| 1431 if (!StringToInt(offset_str, &offset)) | 1431 if (!StringToInt(offset_str, &offset)) |
| 1432 return; | 1432 return; |
| 1433 | 1433 |
| 1434 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); | 1434 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); |
| 1435 if (d) | 1435 if (d) |
| 1436 d->NavigateBackForwardSoon(offset); | 1436 d->NavigateBackForwardSoon(offset); |
| 1437 } | 1437 } |
| OLD | NEW |