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/text/AtomicString.h"
13 class LocalFontFaceSource : public CSSFontFaceSource {
15 LocalFontFaceSource(const String& fontName) : m_fontName(fontName) { }
16 virtual bool isLocal() const { return true; }
17 virtual bool isLocalFontAvailable(const FontDescription&) OVERRIDE;
20 virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) OVERRIDE;
22 class LocalFontHistograms {
24 LocalFontHistograms() : m_reported(false) { }
25 void record(bool loadSuccess);
30 AtomicString m_fontName;
31 LocalFontHistograms m_histograms;