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 "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 public: | 27 public: |
28 enum DisplayPeriod { BlockPeriod, SwapPeriod, FailurePeriod }; | 28 enum DisplayPeriod { BlockPeriod, SwapPeriod, FailurePeriod }; |
29 | 29 |
30 explicit RemoteFontFaceSource(PassRefPtrWillBeRawPtr<FontResource>, PassRefP
trWillBeRawPtr<FontLoader>, FontDisplay); | 30 explicit RemoteFontFaceSource(PassRefPtrWillBeRawPtr<FontResource>, PassRefP
trWillBeRawPtr<FontLoader>, FontDisplay); |
31 ~RemoteFontFaceSource() override; | 31 ~RemoteFontFaceSource() override; |
32 void dispose(); | 32 void dispose(); |
33 | 33 |
34 bool isLoading() const override; | 34 bool isLoading() const override; |
35 bool isLoaded() const override; | 35 bool isLoaded() const override; |
36 bool isValid() const override; | 36 bool isValid() const override; |
37 DisplayPeriod displayPeriod() const { return m_period; } | 37 DisplayPeriod getDisplayPeriod() const { return m_period; } |
38 | 38 |
39 void beginLoadIfNeeded() override; | 39 void beginLoadIfNeeded() override; |
40 | 40 |
41 void didStartFontLoad(FontResource*) override; | 41 void didStartFontLoad(FontResource*) override; |
42 void fontLoaded(FontResource*) override; | 42 void fontLoaded(FontResource*) override; |
43 void fontLoadShortLimitExceeded(FontResource*) override; | 43 void fontLoadShortLimitExceeded(FontResource*) override; |
44 void fontLoadLongLimitExceeded(FontResource*) override; | 44 void fontLoadLongLimitExceeded(FontResource*) override; |
45 String debugName() const override { return "RemoteFontFaceSource"; } | 45 String debugName() const override { return "RemoteFontFaceSource"; } |
46 | 46 |
47 // For UMA reporting | 47 // For UMA reporting |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 RefPtrWillBeMember<FontLoader> m_fontLoader; | 82 RefPtrWillBeMember<FontLoader> m_fontLoader; |
83 const FontDisplay m_display; | 83 const FontDisplay m_display; |
84 DisplayPeriod m_period; | 84 DisplayPeriod m_period; |
85 FontLoadHistograms m_histograms; | 85 FontLoadHistograms m_histograms; |
86 bool m_isInterventionTriggered; | 86 bool m_isInterventionTriggered; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace blink | 89 } // namespace blink |
90 | 90 |
91 #endif | 91 #endif |
OLD | NEW |