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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "core/loader/FrameFetchContext.h" | 54 #include "core/loader/FrameFetchContext.h" |
55 #include "core/loader/FrameLoader.h" | 55 #include "core/loader/FrameLoader.h" |
56 #include "core/loader/FrameLoaderClient.h" | 56 #include "core/loader/FrameLoaderClient.h" |
57 #include "core/loader/LinkLoader.h" | 57 #include "core/loader/LinkLoader.h" |
58 #include "core/loader/NetworkHintsInterface.h" | 58 #include "core/loader/NetworkHintsInterface.h" |
59 #include "core/loader/ProgressTracker.h" | 59 #include "core/loader/ProgressTracker.h" |
60 #include "core/loader/appcache/ApplicationCacheHost.h" | 60 #include "core/loader/appcache/ApplicationCacheHost.h" |
61 #include "core/page/FrameTree.h" | 61 #include "core/page/FrameTree.h" |
62 #include "core/page/Page.h" | 62 #include "core/page/Page.h" |
63 #include "platform/HTTPNames.h" | 63 #include "platform/HTTPNames.h" |
| 64 #include "platform/MIMETypeRegistry.h" |
64 #include "platform/UserGestureIndicator.h" | 65 #include "platform/UserGestureIndicator.h" |
65 #include "platform/mhtml/ArchiveResource.h" | 66 #include "platform/mhtml/ArchiveResource.h" |
66 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" | 67 #include "platform/network/ContentSecurityPolicyResponseHeaders.h" |
67 #include "platform/network/HTTPParsers.h" | 68 #include "platform/network/HTTPParsers.h" |
68 #include "platform/plugins/PluginData.h" | 69 #include "platform/plugins/PluginData.h" |
69 #include "platform/weborigin/SchemeRegistry.h" | 70 #include "platform/weborigin/SchemeRegistry.h" |
70 #include "platform/weborigin/SecurityPolicy.h" | 71 #include "platform/weborigin/SecurityPolicy.h" |
71 #include "public/platform/Platform.h" | 72 #include "public/platform/Platform.h" |
72 #include "public/platform/WebDocumentSubresourceFilter.h" | 73 #include "public/platform/WebDocumentSubresourceFilter.h" |
73 #include "public/platform/WebMimeRegistry.h" | |
74 #include "wtf/Assertions.h" | 74 #include "wtf/Assertions.h" |
75 #include "wtf/AutoReset.h" | 75 #include "wtf/AutoReset.h" |
76 #include "wtf/text/WTFString.h" | 76 #include "wtf/text/WTFString.h" |
77 #include <memory> | 77 #include <memory> |
78 | 78 |
79 namespace blink { | 79 namespace blink { |
80 | 80 |
81 static bool isArchiveMIMEType(const String& mimeType) { | 81 static bool isArchiveMIMEType(const String& mimeType) { |
82 return equalIgnoringCase("multipart/related", mimeType); | 82 return equalIgnoringCase("multipart/related", mimeType); |
83 } | 83 } |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 DCHECK(timing().fetchStart()); | 348 DCHECK(timing().fetchStart()); |
349 appendRedirect(requestURL); | 349 appendRedirect(requestURL); |
350 didRedirect(redirectResponse.url(), requestURL); | 350 didRedirect(redirectResponse.url(), requestURL); |
351 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(); | 351 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(); |
352 | 352 |
353 return true; | 353 return true; |
354 } | 354 } |
355 | 355 |
356 static bool canShowMIMEType(const String& mimeType, LocalFrame* frame) { | 356 static bool canShowMIMEType(const String& mimeType, LocalFrame* frame) { |
357 if (Platform::current()->mimeRegistry()->supportsMIMEType(mimeType) == | 357 if (MIMETypeRegistry::isSupportedMIMEType(mimeType)) |
358 WebMimeRegistry::IsSupported) | |
359 return true; | 358 return true; |
360 PluginData* pluginData = frame->pluginData(); | 359 PluginData* pluginData = frame->pluginData(); |
361 return !mimeType.isEmpty() && pluginData && | 360 return !mimeType.isEmpty() && pluginData && |
362 pluginData->supportsMimeType(mimeType); | 361 pluginData->supportsMimeType(mimeType); |
363 } | 362 } |
364 | 363 |
365 bool DocumentLoader::shouldContinueForResponse() const { | 364 bool DocumentLoader::shouldContinueForResponse() const { |
366 if (m_substituteData.isValid()) | 365 if (m_substituteData.isValid()) |
367 return true; | 366 return true; |
368 | 367 |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 m_writer ? m_writer->encoding() : emptyAtom, true, | 793 m_writer ? m_writer->encoding() : emptyAtom, true, |
795 ForceSynchronousParsing); | 794 ForceSynchronousParsing); |
796 if (!source.isNull()) | 795 if (!source.isNull()) |
797 m_writer->appendReplacingData(source); | 796 m_writer->appendReplacingData(source); |
798 endWriting(); | 797 endWriting(); |
799 } | 798 } |
800 | 799 |
801 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 800 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
802 | 801 |
803 } // namespace blink | 802 } // namespace blink |
OLD | NEW |