blob: 63af1bb1e4736c39481c85aa5af6d8c62bd31e7d [file] [log] [blame]
[email protected]20553492013-02-14 02:06:521// Copyright (c) 2012 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 PPAPI_PROXY_BROWSER_FONT_SINGLETON_RESOURCE_H_
6#define PPAPI_PROXY_BROWSER_FONT_SINGLETON_RESOURCE_H_
7
8#include "ppapi/proxy/connection.h"
9#include "ppapi/proxy/plugin_resource.h"
10#include "ppapi/thunk/ppb_browser_font_singleton_api.h"
11
12namespace ppapi {
13namespace proxy {
14
15// This handles the singleton calls (that don't take a PP_Resource parameter)
16// on the browser font interface
17class BrowserFontSingletonResource
18 : public PluginResource,
19 public thunk::PPB_BrowserFont_Singleton_API {
20 public:
21 BrowserFontSingletonResource(Connection connection, PP_Instance instance);
Peter Boström3d5b3cb2021-09-23 21:35:4522
23 BrowserFontSingletonResource(const BrowserFontSingletonResource&) = delete;
24 BrowserFontSingletonResource& operator=(const BrowserFontSingletonResource&) =
25 delete;
26
nicke4784432015-04-23 14:01:4827 ~BrowserFontSingletonResource() override;
[email protected]20553492013-02-14 02:06:5228
29 // Resource override.
nicke4784432015-04-23 14:01:4830 thunk::PPB_BrowserFont_Singleton_API*
mostynb699af3c2014-10-06 18:03:3431 AsPPB_BrowserFont_Singleton_API() override;
[email protected]20553492013-02-14 02:06:5232
33 // thunk::PPB_BrowserFontSingleton_API implementation.
nicke4784432015-04-23 14:01:4834 PP_Var GetFontFamilies(PP_Instance instance) override;
[email protected]20553492013-02-14 02:06:5235
36 private:
37 // Lazily-filled-in list of font families.
38 std::string families_;
[email protected]20553492013-02-14 02:06:5239};
40
41} // namespace proxy
42} // namespace ppapi
43
44#endif // PPAPI_PROXY_BROWSER_FONT_SINGLETON_RESOURCE_H_