| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 #include "platform/HTTPNames.h" | 63 #include "platform/HTTPNames.h" |
| 64 #include "platform/Logging.h" | 64 #include "platform/Logging.h" |
| 65 #include "platform/UserGestureIndicator.h" | 65 #include "platform/UserGestureIndicator.h" |
| 66 #include "platform/mhtml/ArchiveResource.h" | 66 #include "platform/mhtml/ArchiveResource.h" |
| 67 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" | 67 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" |
| 68 #include "platform/network/HTTPParsers.h" | 68 #include "platform/network/HTTPParsers.h" |
| 69 #include "platform/plugins/PluginData.h" | 69 #include "platform/plugins/PluginData.h" |
| 70 #include "platform/weborigin/SchemeRegistry.h" | 70 #include "platform/weborigin/SchemeRegistry.h" |
| 71 #include "platform/weborigin/SecurityPolicy.h" | 71 #include "platform/weborigin/SecurityPolicy.h" |
| 72 #include "public/platform/Platform.h" | 72 #include "public/platform/Platform.h" |
| 73 #include "public/platform/WebDocumentSubresourceFilter.h" |
| 73 #include "public/platform/WebMimeRegistry.h" | 74 #include "public/platform/WebMimeRegistry.h" |
| 74 #include "wtf/Assertions.h" | 75 #include "wtf/Assertions.h" |
| 75 #include "wtf/TemporaryChange.h" | 76 #include "wtf/TemporaryChange.h" |
| 76 #include "wtf/text/WTFString.h" | 77 #include "wtf/text/WTFString.h" |
| 77 | 78 |
| 78 namespace blink { | 79 namespace blink { |
| 79 | 80 |
| 80 static bool isArchiveMIMEType(const String& mimeType) | 81 static bool isArchiveMIMEType(const String& mimeType) |
| 81 { | 82 { |
| 82 return equalIgnoringCase("multipart/related", mimeType); | 83 return equalIgnoringCase("multipart/related", mimeType); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 const ResourceRequest& DocumentLoader::request() const | 158 const ResourceRequest& DocumentLoader::request() const |
| 158 { | 159 { |
| 159 return m_request; | 160 return m_request; |
| 160 } | 161 } |
| 161 | 162 |
| 162 const KURL& DocumentLoader::url() const | 163 const KURL& DocumentLoader::url() const |
| 163 { | 164 { |
| 164 return m_request.url(); | 165 return m_request.url(); |
| 165 } | 166 } |
| 166 | 167 |
| 168 void DocumentLoader::setSubresourceFilter(PassOwnPtr<WebDocumentSubresourceFilte
r> subresourceFilter) |
| 169 { |
| 170 m_subresourceFilter = std::move(subresourceFilter); |
| 171 } |
| 172 |
| 167 Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques
t) | 173 Resource* DocumentLoader::startPreload(Resource::Type type, FetchRequest& reques
t) |
| 168 { | 174 { |
| 169 Resource* resource = nullptr; | 175 Resource* resource = nullptr; |
| 170 switch (type) { | 176 switch (type) { |
| 171 case Resource::Image: | 177 case Resource::Image: |
| 172 resource = ImageResource::fetch(request, fetcher()); | 178 resource = ImageResource::fetch(request, fetcher()); |
| 173 break; | 179 break; |
| 174 case Resource::Script: | 180 case Resource::Script: |
| 175 resource = ScriptResource::fetch(request, fetcher()); | 181 resource = ScriptResource::fetch(request, fetcher()); |
| 176 break; | 182 break; |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 { | 690 { |
| 685 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); | 691 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding()
: emptyAtom, true, ForceSynchronousParsing); |
| 686 if (!source.isNull()) | 692 if (!source.isNull()) |
| 687 m_writer->appendReplacingData(source); | 693 m_writer->appendReplacingData(source); |
| 688 endWriting(m_writer.get()); | 694 endWriting(m_writer.get()); |
| 689 } | 695 } |
| 690 | 696 |
| 691 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 697 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
| 692 | 698 |
| 693 } // namespace blink | 699 } // namespace blink |
| OLD | NEW |