| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 page->GetChromeClient().Focus(); | 980 page->GetChromeClient().Focus(); |
| 981 return; | 981 return; |
| 982 } | 982 } |
| 983 | 983 |
| 984 SetReferrerForFrameRequest(request); | 984 SetReferrerForFrameRequest(request); |
| 985 | 985 |
| 986 if (!target_frame && !request.FrameName().IsEmpty()) { | 986 if (!target_frame && !request.FrameName().IsEmpty()) { |
| 987 if (policy == kNavigationPolicyDownload) { | 987 if (policy == kNavigationPolicyDownload) { |
| 988 Client()->LoadURLExternally(request.GetResourceRequest(), | 988 Client()->LoadURLExternally(request.GetResourceRequest(), |
| 989 kNavigationPolicyDownload, String(), false); | 989 kNavigationPolicyDownload, String(), false); |
| 990 } else { | 990 return; // Navigation/download will be handled by the client. |
| 991 } else if (ShouldNavigateTargetFrame(policy)) { |
| 991 request.GetResourceRequest().SetFrameType( | 992 request.GetResourceRequest().SetFrameType( |
| 992 WebURLRequest::kFrameTypeAuxiliary); | 993 WebURLRequest::kFrameTypeAuxiliary); |
| 993 CreateWindowForRequest(request, *frame_, policy); | 994 CreateWindowForRequest(request, *frame_, policy); |
| 995 return; // Navigation will be handled by the new frame/window. |
| 994 } | 996 } |
| 995 return; | |
| 996 } | 997 } |
| 997 | 998 |
| 998 if (!frame_->IsNavigationAllowed()) | 999 if (!frame_->IsNavigationAllowed()) |
| 999 return; | 1000 return; |
| 1000 | 1001 |
| 1001 const KURL& url = request.GetResourceRequest().Url(); | 1002 const KURL& url = request.GetResourceRequest().Url(); |
| 1002 FrameLoadType new_load_type = (frame_load_type == kFrameLoadTypeStandard) | 1003 FrameLoadType new_load_type = (frame_load_type == kFrameLoadTypeStandard) |
| 1003 ? DetermineFrameLoadType(request) | 1004 ? DetermineFrameLoadType(request) |
| 1004 : frame_load_type; | 1005 : frame_load_type; |
| 1005 bool same_document_history_navigation = | 1006 bool same_document_history_navigation = |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1849 // TODO(japhet): This is needed because the browser process DCHECKs if the | 1850 // TODO(japhet): This is needed because the browser process DCHECKs if the |
| 1850 // first entry we commit in a new frame has replacement set. It's unclear | 1851 // first entry we commit in a new frame has replacement set. It's unclear |
| 1851 // whether the DCHECK is right, investigate removing this special case. | 1852 // whether the DCHECK is right, investigate removing this special case. |
| 1852 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && | 1853 bool replace_current_item = load_type == kFrameLoadTypeReplaceCurrentItem && |
| 1853 (!Opener() || !request.Url().IsEmpty()); | 1854 (!Opener() || !request.Url().IsEmpty()); |
| 1854 loader->SetReplacesCurrentHistoryItem(replace_current_item); | 1855 loader->SetReplacesCurrentHistoryItem(replace_current_item); |
| 1855 return loader; | 1856 return loader; |
| 1856 } | 1857 } |
| 1857 | 1858 |
| 1858 } // namespace blink | 1859 } // namespace blink |
| OLD | NEW |