Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 976 request.setFrameName("_self"); | 976 request.setFrameName("_self"); |
| 977 targetFrame->navigate(request); | 977 targetFrame->navigate(request); |
| 978 Page* page = targetFrame->page(); | 978 Page* page = targetFrame->page(); |
| 979 if (!wasInSamePage && page) | 979 if (!wasInSamePage && page) |
| 980 page->chromeClient().focus(); | 980 page->chromeClient().focus(); |
| 981 return; | 981 return; |
| 982 } | 982 } |
| 983 | 983 |
| 984 setReferrerForFrameRequest(request); | 984 setReferrerForFrameRequest(request); |
| 985 | 985 |
| 986 AtomicString requiredCSP = m_frame->owner() ? m_frame->owner()->csp() : null Atom; | |
| 987 if (RuntimeEnabledFeatures::embedderCSPEnforcementEnabled() && !requiredCSP. isNull()) { | |
| 988 // Record the latest requiredCSP value that was used when sending this r equest. | |
|
amalika
2016/09/29 13:01:14
This seems to be necessary to make sure we correct
Mike West
2016/09/29 13:33:13
I agree that we need to bind the required CSP so t
| |
| 989 m_frame->localDOMWindow()->setRequiredCSP(requiredCSP); | |
| 990 request.resourceRequest().setHTTPHeaderField(HTTPNames::Embedding_CSP, r equiredCSP); | |
|
Mike West
2016/09/29 13:33:13
I think I'd prefer to push this logic out to a sep
| |
| 991 } | |
| 992 | |
| 986 FrameLoadType newLoadType = (frameLoadType == FrameLoadTypeStandard) ? | 993 FrameLoadType newLoadType = (frameLoadType == FrameLoadTypeStandard) ? |
| 987 determineFrameLoadType(request) : frameLoadType; | 994 determineFrameLoadType(request) : frameLoadType; |
| 988 NavigationPolicy policy = navigationPolicyForRequest(request); | 995 NavigationPolicy policy = navigationPolicyForRequest(request); |
| 989 if (shouldOpenInNewWindow(targetFrame, request, policy)) { | 996 if (shouldOpenInNewWindow(targetFrame, request, policy)) { |
| 990 if (policy == NavigationPolicyDownload) { | 997 if (policy == NavigationPolicyDownload) { |
| 991 client()->loadURLExternally(request.resourceRequest(), NavigationPol icyDownload, String(), false); | 998 client()->loadURLExternally(request.resourceRequest(), NavigationPol icyDownload, String(), false); |
| 992 } else { | 999 } else { |
| 993 request.resourceRequest().setFrameType(WebURLRequest::FrameTypeAuxil iary); | 1000 request.resourceRequest().setFrameType(WebURLRequest::FrameTypeAuxil iary); |
| 994 createWindowForRequest(request, *m_frame, policy); | 1001 createWindowForRequest(request, *m_frame, policy); |
| 995 } | 1002 } |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1674 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); | 1681 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); |
| 1675 return tracedValue; | 1682 return tracedValue; |
| 1676 } | 1683 } |
| 1677 | 1684 |
| 1678 inline void FrameLoader::takeObjectSnapshot() const | 1685 inline void FrameLoader::takeObjectSnapshot() const |
| 1679 { | 1686 { |
| 1680 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); | 1687 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); |
| 1681 } | 1688 } |
| 1682 | 1689 |
| 1683 } // namespace blink | 1690 } // namespace blink |
| OLD | NEW |