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

Side by Side Diff: third_party/WebKit/Source/core/fetch/FontResource.h

Issue 2510603002: Loading: split tests depend on FontResource to loader/resource/FontResourceTest (Closed)
Patch Set: rebase for cache aware loading Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 }; 104 };
105 105
106 std::unique_ptr<FontCustomPlatformData> m_fontData; 106 std::unique_ptr<FontCustomPlatformData> m_fontData;
107 String m_otsParsingMessage; 107 String m_otsParsingMessage;
108 LoadLimitState m_loadLimitState; 108 LoadLimitState m_loadLimitState;
109 bool m_corsFailed; 109 bool m_corsFailed;
110 Timer<FontResource> m_fontLoadShortLimitTimer; 110 Timer<FontResource> m_fontLoadShortLimitTimer;
111 Timer<FontResource> m_fontLoadLongLimitTimer; 111 Timer<FontResource> m_fontLoadLongLimitTimer;
112 112
113 friend class MemoryCache; 113 friend class MemoryCache;
114 FRIEND_TEST_ALL_PREFIXES(ResourceFetcherTest, CacheAwareFontLoading); 114 FRIEND_TEST_ALL_PREFIXES(FontResourceTest, CacheAwareFontLoading);
115 }; 115 };
116 116
117 DEFINE_RESOURCE_TYPE_CASTS(Font); 117 DEFINE_RESOURCE_TYPE_CASTS(Font);
118 118
119 class FontResourceClient : public ResourceClient { 119 class FontResourceClient : public ResourceClient {
120 public: 120 public:
121 ~FontResourceClient() override {} 121 ~FontResourceClient() override {}
122 static bool isExpectedType(ResourceClient* client) { 122 static bool isExpectedType(ResourceClient* client) {
123 return client->getResourceClientType() == FontType; 123 return client->getResourceClientType() == FontType;
124 } 124 }
(...skipping 10 matching lines...) Expand all
135 // Only the RemoteFontFaceSources clients can prevent lowering of loading 135 // Only the RemoteFontFaceSources clients can prevent lowering of loading
136 // priority of the remote fonts. Set the default to true to prevent 136 // priority of the remote fonts. Set the default to true to prevent
137 // other clients from incorrectly returning false. 137 // other clients from incorrectly returning false.
138 return true; 138 return true;
139 } 139 }
140 }; 140 };
141 141
142 } // namespace blink 142 } // namespace blink
143 143
144 #endif 144 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/fetch/MockFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698