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

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

Issue 1304623002: Make blink classes and structures in core/css fast-allocated (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing (Fixed windows compile error) Created 5 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 | « Source/core/css/DocumentFontFaceSet.h ('k') | Source/core/css/FontSize.h » ('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 16 matching lines...) Expand all
27 #define FontFaceSet_h 27 #define FontFaceSet_h
28 28
29 #include "bindings/core/v8/ScriptPromise.h" 29 #include "bindings/core/v8/ScriptPromise.h"
30 #include "core/css/FontFace.h" 30 #include "core/css/FontFace.h"
31 #include "core/css/FontFaceSetForEachCallback.h" 31 #include "core/css/FontFaceSetForEachCallback.h"
32 #include "core/dom/ActiveDOMObject.h" 32 #include "core/dom/ActiveDOMObject.h"
33 #include "core/events/EventListener.h" 33 #include "core/events/EventListener.h"
34 #include "core/events/EventTarget.h" 34 #include "core/events/EventTarget.h"
35 #include "platform/AsyncMethodRunner.h" 35 #include "platform/AsyncMethodRunner.h"
36 #include "platform/RefCountedSupplement.h" 36 #include "platform/RefCountedSupplement.h"
37 #include "wtf/Allocator.h"
37 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
38 #include "wtf/RefCounted.h" 39 #include "wtf/RefCounted.h"
39 #include "wtf/Vector.h" 40 #include "wtf/Vector.h"
40 41
41 // Mac OS X 10.6 SDK defines check() macro that interfares with our check() meth od 42 // Mac OS X 10.6 SDK defines check() macro that interfares with our check() meth od
42 #ifdef check 43 #ifdef check
43 #undef check 44 #undef check
44 #endif 45 #endif
45 46
46 namespace blink { 47 namespace blink {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 111
111 DECLARE_VIRTUAL_TRACE(); 112 DECLARE_VIRTUAL_TRACE();
112 113
113 private: 114 private:
114 static PassRefPtrWillBeRawPtr<FontFaceSet> create(Document& document) 115 static PassRefPtrWillBeRawPtr<FontFaceSet> create(Document& document)
115 { 116 {
116 return adoptRefWillBeNoop(new FontFaceSet(document)); 117 return adoptRefWillBeNoop(new FontFaceSet(document));
117 } 118 }
118 119
119 class FontLoadHistogram { 120 class FontLoadHistogram {
121 DISALLOW_ALLOCATION();
120 public: 122 public:
121 enum Status { NoWebFonts, HadBlankText, DidNotHaveBlankText, Reported }; 123 enum Status { NoWebFonts, HadBlankText, DidNotHaveBlankText, Reported };
122 FontLoadHistogram() : m_status(NoWebFonts), m_count(0), m_recorded(false ) { } 124 FontLoadHistogram() : m_status(NoWebFonts), m_count(0), m_recorded(false ) { }
123 void incrementCount() { m_count++; } 125 void incrementCount() { m_count++; }
124 void updateStatus(FontFace*); 126 void updateStatus(FontFace*);
125 void record(); 127 void record();
126 128
127 private: 129 private:
128 Status m_status; 130 Status m_status;
129 int m_count; 131 int m_count;
(...skipping 23 matching lines...) Expand all
153 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>> m_nonCSSConnectedFaces; 155 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>> m_nonCSSConnectedFaces;
154 156
155 AsyncMethodRunner<FontFaceSet> m_asyncRunner; 157 AsyncMethodRunner<FontFaceSet> m_asyncRunner;
156 158
157 FontLoadHistogram m_histogram; 159 FontLoadHistogram m_histogram;
158 }; 160 };
159 161
160 } // namespace blink 162 } // namespace blink
161 163
162 #endif // FontFaceSet_h 164 #endif // FontFaceSet_h
OLDNEW
« no previous file with comments | « Source/core/css/DocumentFontFaceSet.h ('k') | Source/core/css/FontSize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698