| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 6 * (http://www.torchmobile.com/) | 6 * (http://www.torchmobile.com/) |
| 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 10 * Copyright (C) 2011 Google Inc. All rights reserved. | 10 * Copyright (C) 2011 Google Inc. All rights reserved. |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 page->GetChromeClient().Focus(); | 905 page->GetChromeClient().Focus(); |
| 906 return; | 906 return; |
| 907 } | 907 } |
| 908 | 908 |
| 909 SetReferrerForFrameRequest(request); | 909 SetReferrerForFrameRequest(request); |
| 910 | 910 |
| 911 if (!target_frame && !request.FrameName().IsEmpty()) { | 911 if (!target_frame && !request.FrameName().IsEmpty()) { |
| 912 if (policy == kNavigationPolicyDownload) { | 912 if (policy == kNavigationPolicyDownload) { |
| 913 Client()->LoadURLExternally(request.GetResourceRequest(), | 913 Client()->LoadURLExternally(request.GetResourceRequest(), |
| 914 kNavigationPolicyDownload, String(), false); | 914 kNavigationPolicyDownload, String(), false); |
| 915 } else { | 915 return; // Navigation/download will be handled by the client. |
| 916 } else if (ShouldNavigateTargetFrame(policy)) { |
| 916 request.GetResourceRequest().SetFrameType( | 917 request.GetResourceRequest().SetFrameType( |
| 917 WebURLRequest::kFrameTypeAuxiliary); | 918 WebURLRequest::kFrameTypeAuxiliary); |
| 918 CreateWindowForRequest(request, *frame_, policy); | 919 CreateWindowForRequest(request, *frame_, policy); |
| 920 return; // Navigation will be handled by the new frame/window. |
| 919 } | 921 } |
| 920 return; | |
| 921 } | 922 } |
| 922 | 923 |
| 923 if (!frame_->IsNavigationAllowed()) | 924 if (!frame_->IsNavigationAllowed()) |
| 924 return; | 925 return; |
| 925 | 926 |
| 926 const KURL& url = request.GetResourceRequest().Url(); | 927 const KURL& url = request.GetResourceRequest().Url(); |
| 927 FrameLoadType new_load_type = (frame_load_type == kFrameLoadTypeStandard) | 928 FrameLoadType new_load_type = (frame_load_type == kFrameLoadTypeStandard) |
| 928 ? DetermineFrameLoadType(request) | 929 ? DetermineFrameLoadType(request) |
| 929 : frame_load_type; | 930 : frame_load_type; |
| 930 bool same_document_history_navigation = | 931 bool same_document_history_navigation = |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1774 // TODO(japhet): This is needed because the browser process DCHECKs if the | 1775 // TODO(japhet): This is needed because the browser process DCHECKs if the |
| 1775 // first entry we commit in a new frame has replacement set. It's unclear | 1776 // first entry we commit in a new frame has replacement set. It's unclear |
| 1776 // whether the DCHECK is right, investigate removing this special case. | 1777 // whether the DCHECK is right, investigate removing this special case. |
| 1777 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && | 1778 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && |
| 1778 (!Opener() || !request.Url().IsEmpty()); | 1779 (!Opener() || !request.Url().IsEmpty()); |
| 1779 loader->SetReplacesCurrentHistoryItem(replace_current_item); | 1780 loader->SetReplacesCurrentHistoryItem(replace_current_item); |
| 1780 return loader; | 1781 return loader; |
| 1781 } | 1782 } |
| 1782 | 1783 |
| 1783 } // namespace blink | 1784 } // namespace blink |
| OLD | NEW |