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

Side by Side Diff: third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h

Issue 1894953002: WebFonts: merge fontLoaded() to notifyFinished() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review #6 Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LinkPreloadResourceClients_h 5 #ifndef LinkPreloadResourceClients_h
6 #define LinkPreloadResourceClients_h 6 #define LinkPreloadResourceClients_h
7 7
8 #include "core/fetch/CSSStyleSheetResource.h" 8 #include "core/fetch/CSSStyleSheetResource.h"
9 #include "core/fetch/FontResource.h" 9 #include "core/fetch/FontResource.h"
10 #include "core/fetch/ImageResource.h" 10 #include "core/fetch/ImageResource.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 static LinkPreloadFontResourceClient* create(LinkLoader* loader, FontResourc e* resource) 146 static LinkPreloadFontResourceClient* create(LinkLoader* loader, FontResourc e* resource)
147 { 147 {
148 return new LinkPreloadFontResourceClient(loader, resource); 148 return new LinkPreloadFontResourceClient(loader, resource);
149 } 149 }
150 150
151 virtual String debugName() const { return "LinkPreloadFont"; } 151 virtual String debugName() const { return "LinkPreloadFont"; }
152 virtual ~LinkPreloadFontResourceClient() { } 152 virtual ~LinkPreloadFontResourceClient() { }
153 153
154 void clear() override { clearResource(); } 154 void clear() override { clearResource(); }
155 155
156 void fontLoaded(FontResource* resource) override 156 void notifyFinished(Resource* resource) override
157 { 157 {
158 ASSERT(this->resource() == resource); 158 ASSERT(this->resource() == toFontResource(resource));
159 triggerEvents(resource); 159 triggerEvents(resource);
160 } 160 }
161 161
162 DEFINE_INLINE_VIRTUAL_TRACE() 162 DEFINE_INLINE_VIRTUAL_TRACE()
163 { 163 {
164 LinkPreloadResourceClient::trace(visitor); 164 LinkPreloadResourceClient::trace(visitor);
165 ResourceOwner<FontResource, FontResourceClient>::trace(visitor); 165 ResourceOwner<FontResource, FontResourceClient>::trace(visitor);
166 } 166 }
167 167
168 private: 168 private:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 LinkPreloadRawResourceClient(LinkLoader* loader, RawResource* resource) 202 LinkPreloadRawResourceClient(LinkLoader* loader, RawResource* resource)
203 : LinkPreloadResourceClient(loader) 203 : LinkPreloadResourceClient(loader)
204 { 204 {
205 setResource(resource); 205 setResource(resource);
206 } 206 }
207 }; 207 };
208 208
209 } // namespace blink 209 } // namespace blink
210 210
211 #endif // LinkPreloadResourceClients_h 211 #endif // LinkPreloadResourceClients_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FontResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698