| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015, Google Inc. All rights reserved. | 2 * Copyright (c) 2015, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 if (childFrame) { | 102 if (childFrame) { |
| 103 childDocumentLoader->detachFromFrame(); | 103 childDocumentLoader->detachFromFrame(); |
| 104 childDocumentLoader.clear(); | 104 childDocumentLoader.clear(); |
| 105 childFrame->detach(FrameDetachType::Remove); | 105 childFrame->detach(FrameDetachType::Remove); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 FrameFetchContext* createChildFrame() | 109 FrameFetchContext* createChildFrame() |
| 110 { | 110 { |
| 111 childClient = StubFrameLoaderClientWithParent::create(document->frame())
; | 111 childClient = StubFrameLoaderClientWithParent::create(document->frame())
; |
| 112 childFrame = LocalFrame::create(childClient.get(), document->frame()->ho
st(), owner.get()); | 112 childFrame = LocalFrame::create(childClient.get(), document->frame()->ho
st(), owner.get(), nullptr); |
| 113 childFrame->setView(FrameView::create(childFrame.get(), IntSize(500, 500
))); | 113 childFrame->setView(FrameView::create(childFrame.get(), IntSize(500, 500
))); |
| 114 childFrame->init(); | 114 childFrame->init(); |
| 115 childDocumentLoader = DocumentLoader::create(childFrame.get(), ResourceR
equest("http://www.example.com"), SubstituteData()); | 115 childDocumentLoader = DocumentLoader::create(childFrame.get(), ResourceR
equest("http://www.example.com"), SubstituteData()); |
| 116 childDocument = childFrame->document(); | 116 childDocument = childFrame->document(); |
| 117 FrameFetchContext* childFetchContext = static_cast<FrameFetchContext*>(&
childDocumentLoader->fetcher()->context()); | 117 FrameFetchContext* childFetchContext = static_cast<FrameFetchContext*>(&
childDocumentLoader->fetcher()->context()); |
| 118 FrameFetchContext::provideDocumentToContext(*childFetchContext, childDoc
ument.get()); | 118 FrameFetchContext::provideDocumentToContext(*childFetchContext, childDoc
ument.get()); |
| 119 return childFetchContext; | 119 return childFetchContext; |
| 120 } | 120 } |
| 121 | 121 |
| 122 OwnPtr<DummyPageHolder> dummyPageHolder; | 122 OwnPtr<DummyPageHolder> dummyPageHolder; |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 fetchContext->addAdditionalRequestHeaders(mainRequest, FetchMainResource
); | 709 fetchContext->addAdditionalRequestHeaders(mainRequest, FetchMainResource
); |
| 710 EXPECT_EQ(mainRequest.isExternalRequest(), test.isExternalExpectation); | 710 EXPECT_EQ(mainRequest.isExternalRequest(), test.isExternalExpectation); |
| 711 | 711 |
| 712 ResourceRequest subRequest(test.url); | 712 ResourceRequest subRequest(test.url); |
| 713 fetchContext->addAdditionalRequestHeaders(subRequest, FetchSubresource); | 713 fetchContext->addAdditionalRequestHeaders(subRequest, FetchSubresource); |
| 714 EXPECT_EQ(subRequest.isExternalRequest(), test.isExternalExpectation); | 714 EXPECT_EQ(subRequest.isExternalRequest(), test.isExternalExpectation); |
| 715 } | 715 } |
| 716 } | 716 } |
| 717 | 717 |
| 718 } // namespace blink | 718 } // namespace blink |
| OLD | NEW |