OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 RemoteFontFaceSource_h | 5 #ifndef RemoteFontFaceSource_h |
6 #define RemoteFontFaceSource_h | 6 #define RemoteFontFaceSource_h |
7 | 7 |
8 #include "core/css/CSSFontFaceSource.h" | 8 #include "core/css/CSSFontFaceSource.h" |
9 #include "core/fetch/FontResource.h" | 9 #include "core/fetch/FontResource.h" |
10 #include "core/fetch/ResourcePtr.h" | 10 #include "core/fetch/ResourcePtr.h" |
11 #include "wtf/Allocator.h" | 11 #include "wtf/Allocator.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class FontLoader; | 15 class FontLoader; |
16 | 16 |
17 enum FontDisplay { | 17 enum FontDisplay { |
18 FontDisplayAuto, | 18 FontDisplayAuto, |
19 FontDisplayBlock, | 19 FontDisplayBlock, |
20 FontDisplaySwap, | 20 FontDisplaySwap, |
21 FontDisplayFallback, | 21 FontDisplayFallback, |
22 FontDisplayOptional | 22 FontDisplayOptional, |
| 23 FontDisplayEnumMax |
23 }; | 24 }; |
24 | 25 |
25 class RemoteFontFaceSource final : public CSSFontFaceSource, public FontResource
Client { | 26 class RemoteFontFaceSource final : public CSSFontFaceSource, public FontResource
Client { |
26 WILL_BE_USING_PRE_FINALIZER(RemoteFontFaceSource, dispose); | 27 WILL_BE_USING_PRE_FINALIZER(RemoteFontFaceSource, dispose); |
27 public: | 28 public: |
28 enum DisplayPeriod { BlockPeriod, SwapPeriod, FailurePeriod }; | 29 enum DisplayPeriod { BlockPeriod, SwapPeriod, FailurePeriod }; |
29 | 30 |
30 explicit RemoteFontFaceSource(FontResource*, PassRefPtrWillBeRawPtr<FontLoad
er>, FontDisplay); | 31 explicit RemoteFontFaceSource(FontResource*, PassRefPtrWillBeRawPtr<FontLoad
er>, FontDisplay); |
31 ~RemoteFontFaceSource() override; | 32 ~RemoteFontFaceSource() override; |
32 void dispose(); | 33 void dispose(); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 RefPtrWillBeMember<FontLoader> m_fontLoader; | 84 RefPtrWillBeMember<FontLoader> m_fontLoader; |
84 const FontDisplay m_display; | 85 const FontDisplay m_display; |
85 DisplayPeriod m_period; | 86 DisplayPeriod m_period; |
86 FontLoadHistograms m_histograms; | 87 FontLoadHistograms m_histograms; |
87 bool m_isInterventionTriggered; | 88 bool m_isInterventionTriggered; |
88 }; | 89 }; |
89 | 90 |
90 } // namespace blink | 91 } // namespace blink |
91 | 92 |
92 #endif | 93 #endif |
OLD | NEW |