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

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

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. Created 3 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 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 LoadLimitState m_loadLimitState; 113 LoadLimitState m_loadLimitState;
114 bool m_corsFailed; 114 bool m_corsFailed;
115 Timer<FontResource> m_fontLoadShortLimitTimer; 115 Timer<FontResource> m_fontLoadShortLimitTimer;
116 Timer<FontResource> m_fontLoadLongLimitTimer; 116 Timer<FontResource> m_fontLoadLongLimitTimer;
117 117
118 friend class MemoryCache; 118 friend class MemoryCache;
119 FRIEND_TEST_ALL_PREFIXES(FontResourceTest, CacheAwareFontLoading); 119 FRIEND_TEST_ALL_PREFIXES(FontResourceTest, CacheAwareFontLoading);
120 }; 120 };
121 121
122 DEFINE_RESOURCE_TYPE_CASTS(Font); 122 DEFINE_RESOURCE_TYPE_CASTS(Font);
123 /* DO NOT SUBMIT - Conflict resolution helper:
124 * Above we should have Font, not kFont */
123 125
124 class FontResourceClient : public ResourceClient { 126 class FontResourceClient : public ResourceClient {
125 public: 127 public:
126 ~FontResourceClient() override {} 128 ~FontResourceClient() override {}
127 static bool isExpectedType(ResourceClient* client) { 129 static bool isExpectedType(ResourceClient* client) {
128 return client->getResourceClientType() == FontType; 130 return client->getResourceClientType() == FontType;
129 } 131 }
130 ResourceClientType getResourceClientType() const final { return FontType; } 132 ResourceClientType getResourceClientType() const final { return FontType; }
131 133
132 // If cache-aware loading is activated, both callbacks will be blocked until 134 // If cache-aware loading is activated, both callbacks will be blocked until
133 // disk cache miss. Calls to addClient() and removeClient() in both callbacks 135 // disk cache miss. Calls to addClient() and removeClient() in both callbacks
134 // are prohibited to prevent race issues regarding current loading state. 136 // are prohibited to prevent race issues regarding current loading state.
135 virtual void fontLoadShortLimitExceeded(FontResource*) {} 137 virtual void fontLoadShortLimitExceeded(FontResource*) {}
136 virtual void fontLoadLongLimitExceeded(FontResource*) {} 138 virtual void fontLoadLongLimitExceeded(FontResource*) {}
137 139
138 // Returns true if loading priority of remote font resources can be lowered. 140 // Returns true if loading priority of remote font resources can be lowered.
139 virtual bool isLowPriorityLoadingAllowedForRemoteFont() const { 141 virtual bool isLowPriorityLoadingAllowedForRemoteFont() const {
140 // Only the RemoteFontFaceSources clients can prevent lowering of loading 142 // Only the RemoteFontFaceSources clients can prevent lowering of loading
141 // priority of the remote fonts. Set the default to true to prevent 143 // priority of the remote fonts. Set the default to true to prevent
142 // other clients from incorrectly returning false. 144 // other clients from incorrectly returning false.
143 return true; 145 return true;
144 } 146 }
145 }; 147 };
146 148
147 } // namespace blink 149 } // namespace blink
148 150
149 #endif 151 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698