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.
4
5#ifndef SVGRemoteFontFaceSource_h
6#define SVGRemoteFontFaceSource_h
7
8#if ENABLE(SVG_FONTS)
9
10#include "core/css/RemoteFontFaceSource.h"
11#include "platform/heap/Handle.h"
12
13namespace blink {
14
15class SVGFontElement;
16
17class SVGRemoteFontFaceSource : public RemoteFontFaceSource {
18public:
19    SVGRemoteFontFaceSource(const String& uri, FontResource*, PassRefPtrWillBeRawPtr<FontLoader>);
20    ~SVGRemoteFontFaceSource();
21    virtual bool isSVGFontFaceSource() const OVERRIDE { return true; }
22    virtual bool ensureFontData() OVERRIDE;
23
24    virtual void trace(Visitor*) OVERRIDE;
25
26private:
27    virtual PassRefPtr<SimpleFontData> createFontData(const FontDescription&) OVERRIDE;
28
29    String m_uri;
30    RefPtrWillBeMember<SVGFontElement> m_externalSVGFontElement;
31};
32
33} // namespace blink
34
35#endif // ENABLE(SVG_FONTS)
36#endif
37