1 // Copyright (c) 2011 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 CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
6 #define CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
7 
8 #include <memory>
9 
10 #include "base/callback.h"
11 #include "content/common/content_export.h"
12 
13 namespace base {
14 class ListValue;
15 }
16 
17 namespace content {
18 
19 // Retrieves the list of fonts on the system as a list of strings. It provides
20 // a non-blocking interface to GetFontList_SlowBlocking in common/.
21 //
22 // This function will run asynchronously on a background thread since getting
23 // the font list from the system can be slow. The callback will be executed on
24 // the calling sequence.
25 CONTENT_EXPORT void GetFontListAsync(
26     base::OnceCallback<void(std::unique_ptr<base::ListValue>)> callback);
27 
28 }  // namespace content
29 
30 #endif  // CONTENT_PUBLIC_BROWSER_FONT_LIST_ASYNC_H_
31