| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "core/fetch/MemoryCache.h" | 37 #include "core/fetch/MemoryCache.h" |
| 38 #include "core/fetch/ResourceFetcher.h" | 38 #include "core/fetch/ResourceFetcher.h" |
| 39 #include "core/fetch/ResourceLoader.h" | 39 #include "core/fetch/ResourceLoader.h" |
| 40 #include "core/frame/FrameHost.h" | 40 #include "core/frame/FrameHost.h" |
| 41 #include "core/frame/LocalDOMWindow.h" | 41 #include "core/frame/LocalDOMWindow.h" |
| 42 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 43 #include "core/frame/csp/ContentSecurityPolicy.h" | 43 #include "core/frame/csp/ContentSecurityPolicy.h" |
| 44 #include "core/html/HTMLFrameOwnerElement.h" | 44 #include "core/html/HTMLFrameOwnerElement.h" |
| 45 #include "core/html/parser/HTMLDocumentParser.h" | 45 #include "core/html/parser/HTMLDocumentParser.h" |
| 46 #include "core/html/parser/TextResourceDecoder.h" | 46 #include "core/html/parser/TextResourceDecoder.h" |
| 47 #include "core/html/parser/ThreadedDataReceiver.h" |
| 47 #include "core/inspector/InspectorInstrumentation.h" | 48 #include "core/inspector/InspectorInstrumentation.h" |
| 48 #include "core/loader/FrameLoader.h" | 49 #include "core/loader/FrameLoader.h" |
| 49 #include "core/loader/FrameLoaderClient.h" | 50 #include "core/loader/FrameLoaderClient.h" |
| 50 #include "core/loader/UniqueIdentifier.h" | 51 #include "core/loader/UniqueIdentifier.h" |
| 51 #include "core/loader/appcache/ApplicationCacheHost.h" | 52 #include "core/loader/appcache/ApplicationCacheHost.h" |
| 52 #include "core/page/FrameTree.h" | 53 #include "core/page/FrameTree.h" |
| 53 #include "core/page/Page.h" | 54 #include "core/page/Page.h" |
| 54 #include "core/frame/Settings.h" | 55 #include "core/frame/Settings.h" |
| 55 #include "core/inspector/ConsoleMessage.h" | 56 #include "core/inspector/ConsoleMessage.h" |
| 56 #include "platform/Logging.h" | 57 #include "platform/Logging.h" |
| 57 #include "platform/UserGestureIndicator.h" | 58 #include "platform/UserGestureIndicator.h" |
| 58 #include "platform/mhtml/ArchiveResource.h" | 59 #include "platform/mhtml/ArchiveResource.h" |
| 59 #include "platform/mhtml/ArchiveResourceCollection.h" | 60 #include "platform/mhtml/ArchiveResourceCollection.h" |
| 60 #include "platform/mhtml/MHTMLArchive.h" | 61 #include "platform/mhtml/MHTMLArchive.h" |
| 61 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" | 62 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" |
| 62 #include "platform/plugins/PluginData.h" | 63 #include "platform/plugins/PluginData.h" |
| 63 #include "platform/weborigin/SchemeRegistry.h" | 64 #include "platform/weborigin/SchemeRegistry.h" |
| 64 #include "platform/weborigin/SecurityPolicy.h" | 65 #include "platform/weborigin/SecurityPolicy.h" |
| 65 #include "public/platform/Platform.h" | 66 #include "public/platform/Platform.h" |
| 66 #include "public/platform/WebMimeRegistry.h" | 67 #include "public/platform/WebMimeRegistry.h" |
| 67 #include "public/platform/WebThreadedDataReceiver.h" | |
| 68 #include "wtf/Assertions.h" | 68 #include "wtf/Assertions.h" |
| 69 #include "wtf/text/WTFString.h" | 69 #include "wtf/text/WTFString.h" |
| 70 | 70 |
| 71 namespace blink { | 71 namespace blink { |
| 72 | 72 |
| 73 static bool isArchiveMIMEType(const String& mimeType) | 73 static bool isArchiveMIMEType(const String& mimeType) |
| 74 { | 74 { |
| 75 return mimeType == "multipart/related"; | 75 return mimeType == "multipart/related"; |
| 76 } | 76 } |
| 77 | 77 |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 { | 746 { |
| 747 RefPtr<DocumentLoader> protect(this); | 747 RefPtr<DocumentLoader> protect(this); |
| 748 ResourceError error = resourceError.isNull() ? ResourceError::cancelledError
(m_request.url()) : resourceError; | 748 ResourceError error = resourceError.isNull() ? ResourceError::cancelledError
(m_request.url()) : resourceError; |
| 749 | 749 |
| 750 if (mainResourceLoader()) | 750 if (mainResourceLoader()) |
| 751 mainResourceLoader()->cancel(error); | 751 mainResourceLoader()->cancel(error); |
| 752 | 752 |
| 753 mainReceivedError(error); | 753 mainReceivedError(error); |
| 754 } | 754 } |
| 755 | 755 |
| 756 void DocumentLoader::attachThreadedDataReceiver(PassOwnPtr<blink::WebThreadedDat
aReceiver> threadedDataReceiver) | 756 void DocumentLoader::attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedD
ataReceiver> threadedDataReceiver) |
| 757 { | 757 { |
| 758 if (mainResourceLoader()) | 758 if (mainResourceLoader()) |
| 759 mainResourceLoader()->attachThreadedDataReceiver(threadedDataReceiver); | 759 mainResourceLoader()->attachThreadedDataReceiver(threadedDataReceiver); |
| 760 } | 760 } |
| 761 | 761 |
| 762 void DocumentLoader::acceptDataFromThreadedReceiver(const char* data, int dataLe
ngth, int encodedDataLength) | 762 void DocumentLoader::acceptDataFromThreadedReceiver(const char* data, int dataLe
ngth, int encodedDataLength) |
| 763 { | 763 { |
| 764 m_fetcher->acceptDataFromThreadedReceiver(mainResourceIdentifier(), data, da
taLength, encodedDataLength); | 764 m_fetcher->acceptDataFromThreadedReceiver(mainResourceIdentifier(), data, da
taLength, encodedDataLength); |
| 765 } | 765 } |
| 766 | 766 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 810 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
| 811 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 811 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
| 812 { | 812 { |
| 813 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 813 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
| 814 if (!source.isNull()) | 814 if (!source.isNull()) |
| 815 m_writer->appendReplacingData(source); | 815 m_writer->appendReplacingData(source); |
| 816 endWriting(m_writer.get()); | 816 endWriting(m_writer.get()); |
| 817 } | 817 } |
| 818 | 818 |
| 819 } // namespace blink | 819 } // namespace blink |
| OLD | NEW |