Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2011 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 12 matching lines...) Expand all Loading... | |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef CSSFontSelector_h | 26 #ifndef CSSFontSelector_h |
| 27 #define CSSFontSelector_h | 27 #define CSSFontSelector_h |
| 28 | 28 |
| 29 #include "core/css/CSSSegmentedFontFaceCache.h" | 29 #include "core/css/CSSSegmentedFontFaceCache.h" |
| 30 #include "core/fetch/ResourcePtr.h" | 30 #include "core/fetch/ResourcePtr.h" |
| 31 #include "platform/Timer.h" | 31 #include "platform/Timer.h" |
| 32 #include "platform/fonts/FontSelector.h" | 32 #include "platform/fonts/FontSelector.h" |
| 33 #include "platform/fonts/GenericFontFamilySettings.h" | |
| 33 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 34 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
| 35 #include "wtf/HashSet.h" | 36 #include "wtf/HashSet.h" |
| 36 | 37 |
| 37 namespace WebCore { | 38 namespace WebCore { |
| 38 | 39 |
| 39 class CSSFontFace; | 40 class CSSFontFace; |
| 40 class CSSFontFaceRule; | 41 class CSSFontFaceRule; |
| 41 class CSSSegmentedFontFace; | 42 class CSSSegmentedFontFace; |
| 42 class FontResource; | 43 class FontResource; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 void removeFontFaceRule(const StyleRuleFontFace*); | 82 void removeFontFaceRule(const StyleRuleFontFace*); |
| 82 | 83 |
| 83 void fontLoaded(); | 84 void fontLoaded(); |
| 84 virtual void fontCacheInvalidated(); | 85 virtual void fontCacheInvalidated(); |
| 85 | 86 |
| 86 virtual void registerForInvalidationCallbacks(FontSelectorClient*); | 87 virtual void registerForInvalidationCallbacks(FontSelectorClient*); |
| 87 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*); | 88 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*); |
| 88 | 89 |
| 89 Document* document() const { return m_document; } | 90 Document* document() const { return m_document; } |
| 90 | 91 |
| 92 const GenericFontFamilySettings& genericFontFamilySettings() const { return m_genericFontFamilySettings; } | |
| 93 | |
| 91 void beginLoadingFontSoon(FontResource*); | 94 void beginLoadingFontSoon(FontResource*); |
| 92 void loadPendingFonts(); | 95 void loadPendingFonts(); |
| 93 | 96 |
| 94 private: | 97 private: |
| 95 explicit CSSFontSelector(Document*); | 98 explicit CSSFontSelector(Document*); |
| 96 | 99 |
| 97 void dispatchInvalidationCallbacks(); | 100 void dispatchInvalidationCallbacks(); |
| 98 | 101 |
| 99 Document* m_document; | 102 Document* m_document; |
| 100 // FIXME: Move to Document or StyleEngine. | 103 // FIXME: Move to Document or StyleEngine. |
| 101 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache; | 104 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache; |
| 102 HashSet<FontSelectorClient*> m_clients; | 105 HashSet<FontSelectorClient*> m_clients; |
| 103 | 106 |
| 104 FontLoader m_fontLoader; | 107 FontLoader m_fontLoader; |
| 108 GenericFontFamilySettings m_genericFontFamilySettings; | |
|
esprehn
2013/12/04 00:57:23
Why not store a reference to it?
| |
| 105 }; | 109 }; |
| 106 | 110 |
| 107 } // namespace WebCore | 111 } // namespace WebCore |
| 108 | 112 |
| 109 #endif // CSSFontSelector_h | 113 #endif // CSSFontSelector_h |
| OLD | NEW |