Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h

Issue 1595793002: Revert of Add <link rel=preload> onload support for scripts and styles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
diff --git a/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h b/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
deleted file mode 100644
index 187f06c73421fe7456316c2eeb4e11939c90a811..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef LinkPreloadResourceClients_h
-#define LinkPreloadResourceClients_h
-
-#include "core/fetch/CSSStyleSheetResource.h"
-#include "core/fetch/FontResource.h"
-#include "core/fetch/ImageResourceClient.h"
-#include "core/fetch/ResourceOwner.h"
-#include "core/fetch/ScriptResource.h"
-#include "core/fetch/StyleSheetResourceClient.h"
-
-namespace blink {
-
-class LinkLoader;
-
-class LinkPreloadResourceClient : public NoBaseWillBeGarbageCollectedFinalized<LinkPreloadResourceClient> {
-public:
- virtual ~LinkPreloadResourceClient() { }
-
- void triggerEvents(const Resource*) const;
-
-protected:
- LinkPreloadResourceClient(LinkLoader* loader)
- : m_loader(loader)
- {
- ASSERT(loader);
- }
-
-private:
- LinkLoader* m_loader;
-};
-
-class LinkPreloadScriptResourceClient: public LinkPreloadResourceClient, public ResourceOwner<ScriptResource, ScriptResourceClient> {
-public:
- static PassOwnPtr<LinkPreloadScriptResourceClient> create(LinkLoader* loader, ScriptResource* resource)
- {
- return adoptPtr(new LinkPreloadScriptResourceClient(loader, resource));
- }
-
- virtual String debugName() const { return "LinkPreloadScript"; }
-
- void notifyFinished(Resource* resource) override
- {
- ASSERT(this->resource() == resource);
- triggerEvents(resource);
- }
-
-private:
- LinkPreloadScriptResourceClient(LinkLoader* loader, ScriptResource* resource)
- : LinkPreloadResourceClient(loader)
- {
- setResource(resource);
- }
-};
-
-class LinkPreloadStyleResourceClient: public LinkPreloadResourceClient, public ResourceOwner<CSSStyleSheetResource, StyleSheetResourceClient> {
-public:
- static PassOwnPtr<LinkPreloadStyleResourceClient> create(LinkLoader* loader, CSSStyleSheetResource* resource)
- {
- return adoptPtr(new LinkPreloadStyleResourceClient(loader, resource));
- }
-
- virtual String debugName() const { return "LinkPreloadStyle"; }
-
- void setCSSStyleSheet(const String&, const KURL&, const String&, const CSSStyleSheetResource* resource) override
- {
- ASSERT(this->resource() == resource);
- triggerEvents(static_cast<const Resource*>(resource));
- }
-
-private:
- LinkPreloadStyleResourceClient(LinkLoader* loader, CSSStyleSheetResource* resource)
- : LinkPreloadResourceClient(loader)
- {
- setResource(resource);
- }
-};
-
-}
-
-#endif // LinkPreloadResourceClients_h

Powered by Google App Engine
This is Rietveld 408576698