blob: 03c9c7d321717a7be333c3dddb6ca9f07201e337 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright (c) 2013 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 PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
#define PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
#include <string>
#include <vector>
#include "ppapi/proxy/connection.h"
#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/thunk/ppb_truetype_font_singleton_api.h"
namespace ppapi {
class TrackedCallback;
namespace proxy {
struct SerializedTrueTypeFontDescription;
// This handles the singleton calls (that don't take a PP_Resource parameter)
// on the TrueType font interface.
class TrueTypeFontSingletonResource
: public PluginResource,
public thunk::PPB_TrueTypeFont_Singleton_API {
public:
TrueTypeFontSingletonResource(Connection connection, PP_Instance instance);
virtual ~TrueTypeFontSingletonResource();
// Resource override.
virtual thunk::PPB_TrueTypeFont_Singleton_API*
AsPPB_TrueTypeFont_Singleton_API() OVERRIDE;
// thunk::PPB_TrueTypeFont_Singleton_API implementation.
virtual int32_t GetFontFamilies(
PP_Instance instance,
const PP_ArrayOutput& output,
const scoped_refptr<TrackedCallback>& callback) OVERRIDE;
private:
void OnPluginMsgGetFontFamiliesComplete(
scoped_refptr<TrackedCallback> callback,
PP_ArrayOutput array_output,
const ResourceMessageReplyParams& params,
const std::vector<std::string>& data);
DISALLOW_COPY_AND_ASSIGN(TrueTypeFontSingletonResource);
};
} // namespace proxy
} // namespace ppapi
#endif // PPAPI_PROXY_TRUETYPE_FONT_SINGLETON_RESOURCE_H_
|