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

Side by Side Diff: Source/core/css/CSSFontSelector.h

Issue 140913011: Trim FontSelector interface a bit. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
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 21 matching lines...) Expand all
32 #include "platform/fonts/FontSelector.h" 32 #include "platform/fonts/FontSelector.h"
33 #include "platform/fonts/GenericFontFamilySettings.h" 33 #include "platform/fonts/GenericFontFamilySettings.h"
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 WebCore { 38 namespace WebCore {
39 39
40 class CSSFontFace; 40 class CSSFontFace;
41 class CSSFontFaceRule; 41 class CSSFontFaceRule;
42 class CSSFontSelectorClient;
42 class CSSSegmentedFontFace; 43 class CSSSegmentedFontFace;
43 class FontResource; 44 class FontResource;
44 class Document; 45 class Document;
45 class FontDescription; 46 class FontDescription;
46 class StyleRuleFontFace; 47 class StyleRuleFontFace;
47 48
48 class FontLoader { 49 class FontLoader {
49 public: 50 public:
50 explicit FontLoader(ResourceFetcher*); 51 explicit FontLoader(ResourceFetcher*);
51 52
(...skipping 22 matching lines...) Expand all
74 75
75 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi cString&) OVERRIDE; 76 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi cString&) OVERRIDE;
76 virtual void willUseFontData(const FontDescription&, const AtomicString& fam ily) OVERRIDE; 77 virtual void willUseFontData(const FontDescription&, const AtomicString& fam ily) OVERRIDE;
77 78
78 void clearDocument(); 79 void clearDocument();
79 80
80 void addFontFaceRule(const StyleRuleFontFace*, PassRefPtr<CSSFontFace>); 81 void addFontFaceRule(const StyleRuleFontFace*, PassRefPtr<CSSFontFace>);
81 void removeFontFaceRule(const StyleRuleFontFace*); 82 void removeFontFaceRule(const StyleRuleFontFace*);
82 83
83 void fontLoaded(); 84 void fontLoaded();
85
86 // FontCacheClient implementation
84 virtual void fontCacheInvalidated() OVERRIDE; 87 virtual void fontCacheInvalidated() OVERRIDE;
85 88
86 virtual void registerForInvalidationCallbacks(FontSelectorClient*) OVERRIDE; 89 void registerForInvalidationCallbacks(CSSFontSelectorClient*);
87 virtual void unregisterForInvalidationCallbacks(FontSelectorClient*) OVERRID E; 90 void unregisterForInvalidationCallbacks(CSSFontSelectorClient*);
88 91
89 Document* document() const { return m_document; } 92 Document* document() const { return m_document; }
90 CSSSegmentedFontFaceCache* cssSegmentedFontFaceCache() { return &m_cssSegmen tedFontFaceCache; } 93 CSSSegmentedFontFaceCache* cssSegmentedFontFaceCache() { return &m_cssSegmen tedFontFaceCache; }
91 94
92 const GenericFontFamilySettings& genericFontFamilySettings() const { return m_genericFontFamilySettings; } 95 const GenericFontFamilySettings& genericFontFamilySettings() const { return m_genericFontFamilySettings; }
93 96
94 void beginLoadingFontSoon(FontResource*); 97 void beginLoadingFontSoon(FontResource*);
95 void loadPendingFonts(); 98 void loadPendingFonts();
96 99
97 private: 100 private:
98 explicit CSSFontSelector(Document*); 101 explicit CSSFontSelector(Document*);
99 102
100 void dispatchInvalidationCallbacks(); 103 void dispatchInvalidationCallbacks();
101 104
102 Document* m_document; 105 Document* m_document;
103 // FIXME: Move to Document or StyleEngine. 106 // FIXME: Move to Document or StyleEngine.
104 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache; 107 CSSSegmentedFontFaceCache m_cssSegmentedFontFaceCache;
105 HashSet<FontSelectorClient*> m_clients; 108 HashSet<CSSFontSelectorClient*> m_clients;
106 109
107 FontLoader m_fontLoader; 110 FontLoader m_fontLoader;
108 GenericFontFamilySettings m_genericFontFamilySettings; 111 GenericFontFamilySettings m_genericFontFamilySettings;
109 }; 112 };
110 113
111 } // namespace WebCore 114 } // namespace WebCore
112 115
113 #endif // CSSFontSelector_h 116 #endif // CSSFontSelector_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698