| 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 23 matching lines...) Expand all Loading... |
| 34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include "wtf/HashMap.h" | 35 #include "wtf/HashMap.h" |
| 36 #include "wtf/HashSet.h" | 36 #include "wtf/HashSet.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class CSSFontSelectorClient; | 40 class CSSFontSelectorClient; |
| 41 class Document; | 41 class Document; |
| 42 class FontDescription; | 42 class FontDescription; |
| 43 | 43 |
| 44 class CSSFontSelector FINAL : public FontSelector { | 44 class CSSFontSelector final : public FontSelector { |
| 45 public: | 45 public: |
| 46 static PassRefPtrWillBeRawPtr<CSSFontSelector> create(Document* document) | 46 static PassRefPtrWillBeRawPtr<CSSFontSelector> create(Document* document) |
| 47 { | 47 { |
| 48 return adoptRefWillBeNoop(new CSSFontSelector(document)); | 48 return adoptRefWillBeNoop(new CSSFontSelector(document)); |
| 49 } | 49 } |
| 50 virtual ~CSSFontSelector(); | 50 virtual ~CSSFontSelector(); |
| 51 | 51 |
| 52 virtual unsigned version() const OVERRIDE { return m_fontFaceCache.version()
; } | 52 virtual unsigned version() const override { return m_fontFaceCache.version()
; } |
| 53 | 53 |
| 54 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi
cString&) OVERRIDE; | 54 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi
cString&) override; |
| 55 virtual void willUseFontData(const FontDescription&, const AtomicString& fam
ily, UChar32) OVERRIDE; | 55 virtual void willUseFontData(const FontDescription&, const AtomicString& fam
ily, UChar32) override; |
| 56 bool isPlatformFontAvailable(const FontDescription&, const AtomicString& fam
ily); | 56 bool isPlatformFontAvailable(const FontDescription&, const AtomicString& fam
ily); |
| 57 | 57 |
| 58 #if !ENABLE(OILPAN) | 58 #if !ENABLE(OILPAN) |
| 59 void clearDocument(); | 59 void clearDocument(); |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 void fontFaceInvalidated(); | 62 void fontFaceInvalidated(); |
| 63 | 63 |
| 64 // FontCacheClient implementation | 64 // FontCacheClient implementation |
| 65 virtual void fontCacheInvalidated() OVERRIDE; | 65 virtual void fontCacheInvalidated() override; |
| 66 | 66 |
| 67 void registerForInvalidationCallbacks(CSSFontSelectorClient*); | 67 void registerForInvalidationCallbacks(CSSFontSelectorClient*); |
| 68 #if !ENABLE(OILPAN) | 68 #if !ENABLE(OILPAN) |
| 69 void unregisterForInvalidationCallbacks(CSSFontSelectorClient*); | 69 void unregisterForInvalidationCallbacks(CSSFontSelectorClient*); |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 Document* document() const { return m_document; } | 72 Document* document() const { return m_document; } |
| 73 FontFaceCache* fontFaceCache() { return &m_fontFaceCache; } | 73 FontFaceCache* fontFaceCache() { return &m_fontFaceCache; } |
| 74 FontLoader* fontLoader() { return m_fontLoader.get(); } | 74 FontLoader* fontLoader() { return m_fontLoader.get(); } |
| 75 | 75 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 91 FontFaceCache m_fontFaceCache; | 91 FontFaceCache m_fontFaceCache; |
| 92 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSFontSelectorClient> > m_clients; | 92 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSFontSelectorClient> > m_clients; |
| 93 | 93 |
| 94 RefPtrWillBeMember<FontLoader> m_fontLoader; | 94 RefPtrWillBeMember<FontLoader> m_fontLoader; |
| 95 GenericFontFamilySettings m_genericFontFamilySettings; | 95 GenericFontFamilySettings m_genericFontFamilySettings; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace blink | 98 } // namespace blink |
| 99 | 99 |
| 100 #endif // CSSFontSelector_h | 100 #endif // CSSFontSelector_h |
| OLD | NEW |