| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2013 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "core/html/parser/HTMLResourcePreloader.h" | 26 #include "core/html/parser/HTMLResourcePreloader.h" |
| 27 | 27 |
| 28 #include "core/dom/Document.h" | 28 #include "core/dom/Document.h" |
| 29 #include "core/fetch/Resource.h" | 29 #include "core/fetch/Resource.h" |
| 30 #include "core/fetch/ResourceFetcher.h" | 30 #include "core/fetch/ResourceFetcher.h" |
| 31 #include "core/frame/Deprecation.h" | 31 #include "core/frame/Deprecation.h" |
| 32 #include "core/frame/Settings.h" | 32 #include "core/frame/Settings.h" |
| 33 #include "core/loader/DocumentLoader.h" | 33 #include "core/loader/DocumentLoader.h" |
| 34 #include "core/loader/resource/CSSStyleSheetResource.h" |
| 34 #include "platform/Histogram.h" | 35 #include "platform/Histogram.h" |
| 35 #include "public/platform/Platform.h" | 36 #include "public/platform/Platform.h" |
| 36 #include <memory> | 37 #include <memory> |
| 37 | 38 |
| 38 namespace blink { | 39 namespace blink { |
| 39 | 40 |
| 40 inline HTMLResourcePreloader::HTMLResourcePreloader(Document& document) | 41 inline HTMLResourcePreloader::HTMLResourcePreloader(Document& document) |
| 41 : m_document(document) {} | 42 : m_document(document) {} |
| 42 | 43 |
| 43 HTMLResourcePreloader* HTMLResourcePreloader::create(Document& document) { | 44 HTMLResourcePreloader* HTMLResourcePreloader::create(Document& document) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 if (resource && !resource->isLoaded() && | 88 if (resource && !resource->isLoaded() && |
| 88 preload->resourceType() == Resource::CSSStyleSheet) { | 89 preload->resourceType() == Resource::CSSStyleSheet) { |
| 89 Settings* settings = m_document->settings(); | 90 Settings* settings = m_document->settings(); |
| 90 if (settings && (settings->cssExternalScannerNoPreload() || | 91 if (settings && (settings->cssExternalScannerNoPreload() || |
| 91 settings->cssExternalScannerPreload())) | 92 settings->cssExternalScannerPreload())) |
| 92 m_cssPreloaders.add(new CSSPreloaderResourceClient(resource, this)); | 93 m_cssPreloaders.add(new CSSPreloaderResourceClient(resource, this)); |
| 93 } | 94 } |
| 94 } | 95 } |
| 95 | 96 |
| 96 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |