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

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

Issue 478233003: Make some ScriptValue references const (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadingdone); 73 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadingdone);
74 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadingerror); 74 DEFINE_ATTRIBUTE_EVENT_LISTENER(loadingerror);
75 75
76 bool check(const String& font, const String& text, ExceptionState&); 76 bool check(const String& font, const String& text, ExceptionState&);
77 ScriptPromise load(ScriptState*, const String& font, const String& text); 77 ScriptPromise load(ScriptState*, const String& font, const String& text);
78 ScriptPromise ready(ScriptState*); 78 ScriptPromise ready(ScriptState*);
79 79
80 void add(FontFace*, ExceptionState&); 80 void add(FontFace*, ExceptionState&);
81 void clear(); 81 void clear();
82 bool remove(FontFace*, ExceptionState&); 82 bool remove(FontFace*, ExceptionState&);
83 void forEach(PassOwnPtr<FontFaceSetForEachCallback>, ScriptValue& thisArg) c onst; 83 void forEach(PassOwnPtr<FontFaceSetForEachCallback>, const ScriptValue& this Arg) const;
84 void forEach(PassOwnPtr<FontFaceSetForEachCallback>) const; 84 void forEach(PassOwnPtr<FontFaceSetForEachCallback>) const;
85 bool has(FontFace*, ExceptionState&) const; 85 bool has(FontFace*, ExceptionState&) const;
86 86
87 unsigned long size() const; 87 unsigned long size() const;
88 AtomicString status() const; 88 AtomicString status() const;
89 89
90 virtual ExecutionContext* executionContext() const OVERRIDE; 90 virtual ExecutionContext* executionContext() const OVERRIDE;
91 virtual const AtomicString& interfaceName() const OVERRIDE; 91 virtual const AtomicString& interfaceName() const OVERRIDE;
92 92
93 Document* document() const; 93 Document* document() const;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Status m_status; 129 Status m_status;
130 int m_count; 130 int m_count;
131 bool m_recorded; 131 bool m_recorded;
132 }; 132 };
133 133
134 FontFaceSet(Document&); 134 FontFaceSet(Document&);
135 135
136 bool hasLoadedFonts() const { return !m_loadedFonts.isEmpty() || !m_failedFo nts.isEmpty(); } 136 bool hasLoadedFonts() const { return !m_loadedFonts.isEmpty() || !m_failedFo nts.isEmpty(); }
137 137
138 bool inActiveDocumentContext() const; 138 bool inActiveDocumentContext() const;
139 void forEachInternal(PassOwnPtr<FontFaceSetForEachCallback>, ScriptValue* th isArg) const; 139 void forEachInternal(PassOwnPtr<FontFaceSetForEachCallback>, const ScriptVal ue* thisArg) const;
140 void addToLoadingFonts(PassRefPtrWillBeRawPtr<FontFace>); 140 void addToLoadingFonts(PassRefPtrWillBeRawPtr<FontFace>);
141 void removeFromLoadingFonts(PassRefPtrWillBeRawPtr<FontFace>); 141 void removeFromLoadingFonts(PassRefPtrWillBeRawPtr<FontFace>);
142 void fireLoadingEvent(); 142 void fireLoadingEvent();
143 void fireDoneEventIfPossible(); 143 void fireDoneEventIfPossible();
144 bool resolveFontStyle(const String&, Font&); 144 bool resolveFontStyle(const String&, Font&);
145 void handlePendingEventsAndPromisesSoon(); 145 void handlePendingEventsAndPromisesSoon();
146 void handlePendingEventsAndPromises(); 146 void handlePendingEventsAndPromises();
147 const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFont FaceList() const; 147 const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFont FaceList() const;
148 bool isCSSConnectedFontFace(FontFace*) const; 148 bool isCSSConnectedFontFace(FontFace*) const;
149 149
150 WillBeHeapHashSet<RefPtrWillBeMember<FontFace> > m_loadingFonts; 150 WillBeHeapHashSet<RefPtrWillBeMember<FontFace> > m_loadingFonts;
151 bool m_shouldFireLoadingEvent; 151 bool m_shouldFireLoadingEvent;
152 Vector<OwnPtr<FontsReadyPromiseResolver> > m_readyResolvers; 152 Vector<OwnPtr<FontsReadyPromiseResolver> > m_readyResolvers;
153 FontFaceArray m_loadedFonts; 153 FontFaceArray m_loadedFonts;
154 FontFaceArray m_failedFonts; 154 FontFaceArray m_failedFonts;
155 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> > m_nonCSSConnectedFaces; 155 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> > m_nonCSSConnectedFaces;
156 156
157 AsyncMethodRunner<FontFaceSet> m_asyncRunner; 157 AsyncMethodRunner<FontFaceSet> m_asyncRunner;
158 158
159 FontLoadHistogram m_histogram; 159 FontLoadHistogram m_histogram;
160 }; 160 };
161 161
162 } // namespace blink 162 } // namespace blink
163 163
164 #endif // FontFaceSet_h 164 #endif // FontFaceSet_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698