1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef FontPreloader_h_
8 #define FontPreloader_h_
10 #include "mozilla/FetchPreloader.h"
12 class gfxUserFontEntry
;
13 struct gfxFontFaceSrc
;
17 class FontPreloader final
: public FetchPreloader
{
22 static void PrioritizeAsPreload(nsIChannel
* aChannel
);
23 void PrioritizeAsPreload() override
;
25 static nsresult
BuildChannel(
26 nsIChannel
** aChannel
, nsIURI
* aURI
, const CORSMode aCORSMode
,
27 const dom::ReferrerPolicy
& aReferrerPolicy
,
28 gfxUserFontEntry
* aUserFontEntry
, const gfxFontFaceSrc
* aFontFaceSrc
,
29 dom::Document
* aDocument
, nsILoadGroup
* aLoadGroup
,
30 nsIInterfaceRequestor
* aCallbacks
, bool aIsPreload
);
33 nsresult
CreateChannel(nsIChannel
** aChannel
, nsIURI
* aURI
,
34 const CORSMode aCORSMode
,
35 const dom::ReferrerPolicy
& aReferrerPolicy
,
36 dom::Document
* aDocument
, nsILoadGroup
* aLoadGroup
,
37 nsIInterfaceRequestor
* aCallbacks
) override
;
40 } // namespace mozilla