diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.h b/chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.h new file mode 100644 index 00000000000..3036e4f9723 --- /dev/null +++ b/chromium/third_party/WebKit/Source/core/css/LocalFontFaceSource.h @@ -0,0 +1,36 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef LocalFontFaceSource_h +#define LocalFontFaceSource_h + +#include "core/css/CSSFontFaceSource.h" +#include "wtf/text/AtomicString.h" + +namespace WebCore { + +class LocalFontFaceSource : public CSSFontFaceSource { +public: + LocalFontFaceSource(const String& fontName) : m_fontName(fontName) { } + virtual bool isLocal() const { return true; } + virtual bool isLocalFontAvailable(const FontDescription&) OVERRIDE; + +private: + virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) OVERRIDE; + + class LocalFontHistograms { + public: + LocalFontHistograms() : m_reported(false) { } + void record(bool loadSuccess); + private: + bool m_reported; + }; + + AtomicString m_fontName; + LocalFontHistograms m_histograms; +}; + +} // namespace WebCore + +#endif |