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
3 // found in the LICENSE file.
5 #ifndef LocalFontFaceSource_h
6 #define LocalFontFaceSource_h
8 #include "core/css/CSSFontFaceSource.h"
9 #include "wtf/Allocator.h"
10 #include "wtf/text/AtomicString.h"
14 class LocalFontFaceSource final
: public CSSFontFaceSource
{
16 LocalFontFaceSource(const String
& fontName
) : m_fontName(fontName
) { }
17 bool isLocal() const override
{ return true; }
18 bool isLocalFontAvailable(const FontDescription
&) override
;
21 PassRefPtr
<SimpleFontData
> createFontData(const FontDescription
&) override
;
23 class LocalFontHistograms
{
24 DISALLOW_ALLOCATION();
26 LocalFontHistograms() : m_reported(false) { }
27 void record(bool loadSuccess
);
32 AtomicString m_fontName
;
33 LocalFontHistograms m_histograms
;