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

Side by Side Diff: Source/core/css/LocalFontFaceSource.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/HashTools.h ('k') | Source/core/css/MediaQueryExp.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LocalFontFaceSource_h 5 #ifndef LocalFontFaceSource_h
6 #define LocalFontFaceSource_h 6 #define LocalFontFaceSource_h
7 7
8 #include "core/css/CSSFontFaceSource.h" 8 #include "core/css/CSSFontFaceSource.h"
9 #include "wtf/Allocator.h"
9 #include "wtf/text/AtomicString.h" 10 #include "wtf/text/AtomicString.h"
10 11
11 namespace blink { 12 namespace blink {
12 13
13 class LocalFontFaceSource final : public CSSFontFaceSource { 14 class LocalFontFaceSource final : public CSSFontFaceSource {
14 public: 15 public:
15 LocalFontFaceSource(const String& fontName) : m_fontName(fontName) { } 16 LocalFontFaceSource(const String& fontName) : m_fontName(fontName) { }
16 bool isLocal() const override { return true; } 17 bool isLocal() const override { return true; }
17 bool isLocalFontAvailable(const FontDescription&) override; 18 bool isLocalFontAvailable(const FontDescription&) override;
18 19
19 private: 20 private:
20 PassRefPtr<SimpleFontData> createFontData(const FontDescription&) override; 21 PassRefPtr<SimpleFontData> createFontData(const FontDescription&) override;
21 22
22 class LocalFontHistograms { 23 class LocalFontHistograms {
24 DISALLOW_ALLOCATION();
23 public: 25 public:
24 LocalFontHistograms() : m_reported(false) { } 26 LocalFontHistograms() : m_reported(false) { }
25 void record(bool loadSuccess); 27 void record(bool loadSuccess);
26 private: 28 private:
27 bool m_reported; 29 bool m_reported;
28 }; 30 };
29 31
30 AtomicString m_fontName; 32 AtomicString m_fontName;
31 LocalFontHistograms m_histograms; 33 LocalFontHistograms m_histograms;
32 }; 34 };
33 35
34 } // namespace blink 36 } // namespace blink
35 37
36 #endif 38 #endif
OLDNEW
« no previous file with comments | « Source/core/css/HashTools.h ('k') | Source/core/css/MediaQueryExp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698