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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
589 featurePolicy->setHeaderPolicy( | 589 featurePolicy->setHeaderPolicy( |
590 m_documentLoader->response().httpHeaderField( | 590 m_documentLoader->response().httpHeaderField( |
591 HTTPNames::Feature_Policy), | 591 HTTPNames::Feature_Policy), |
592 messages); | 592 messages); |
593 for (auto& message : messages) { | 593 for (auto& message : messages) { |
594 m_frame->document()->addConsoleMessage(ConsoleMessage::create( | 594 m_frame->document()->addConsoleMessage(ConsoleMessage::create( |
595 OtherMessageSource, ErrorMessageLevel, | 595 OtherMessageSource, ErrorMessageLevel, |
596 "Error with Feature-Policy header: " + message)); | 596 "Error with Feature-Policy header: " + message)); |
597 } | 597 } |
598 m_frame->document()->setFeaturePolicy(std::move(featurePolicy)); | 598 m_frame->document()->setFeaturePolicy(std::move(featurePolicy)); |
599 if (client()) { | |
600 client()->didSetFeaturePolicyHeader( | |
601 m_documentLoader->response().httpHeaderField( | |
602 HTTPNames::Feature_Policy)); | |
603 } | |
Mike West
2016/11/08 12:12:23
An approach that you might wish to consider would
iclelland
2016/11/08 14:25:45
Since a frame can also set policy for itself -- it
| |
599 } | 604 } |
600 } | 605 } |
601 | 606 |
602 if (m_documentLoader) { | 607 if (m_documentLoader) { |
603 String referrerPolicyHeader = m_documentLoader->response().httpHeaderField( | 608 String referrerPolicyHeader = m_documentLoader->response().httpHeaderField( |
604 HTTPNames::Referrer_Policy); | 609 HTTPNames::Referrer_Policy); |
605 if (!referrerPolicyHeader.isNull()) { | 610 if (!referrerPolicyHeader.isNull()) { |
606 m_frame->document()->parseAndSetReferrerPolicy(referrerPolicyHeader); | 611 m_frame->document()->parseAndSetReferrerPolicy(referrerPolicyHeader); |
607 } | 612 } |
608 } | 613 } |
(...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1947 m_documentLoader ? m_documentLoader->url() : String()); | 1952 m_documentLoader ? m_documentLoader->url() : String()); |
1948 return tracedValue; | 1953 return tracedValue; |
1949 } | 1954 } |
1950 | 1955 |
1951 inline void FrameLoader::takeObjectSnapshot() const { | 1956 inline void FrameLoader::takeObjectSnapshot() const { |
1952 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, | 1957 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, |
1953 toTracedValue()); | 1958 toTracedValue()); |
1954 } | 1959 } |
1955 | 1960 |
1956 } // namespace blink | 1961 } // namespace blink |
OLD | NEW |