Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: ppapi/proxy/truetype_font_resource.h

Issue 12600019: Add Pepper TrueType font API plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux_aura. Pango headers missing. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/serialized_structs.cc ('k') | ppapi/proxy/truetype_font_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_TRUETYPE_FONT_RESOURCE_H_
6 #define PPAPI_PROXY_TRUETYPE_FONT_RESOURCE_H_
7
8 #include <string>
9
10 #include "ppapi/proxy/connection.h"
11 #include "ppapi/proxy/plugin_resource.h"
12 #include "ppapi/proxy/ppapi_proxy_export.h"
13 #include "ppapi/shared_impl/var.h"
14 #include "ppapi/thunk/ppb_truetype_font_api.h"
15
16 namespace ppapi {
17
18 class TrackedCallback;
19
20 namespace proxy {
21
22 struct SerializedTrueTypeFontDesc;
23
24 class PPAPI_PROXY_EXPORT TrueTypeFontResource
25 : public PluginResource,
26 public thunk::PPB_TrueTypeFont_API {
27 public:
28 TrueTypeFontResource(Connection connection,
29 PP_Instance instance,
30 const PP_TrueTypeFontDesc_Dev& desc);
31 virtual ~TrueTypeFontResource();
32
33 // Resource overrides.
34 virtual thunk::PPB_TrueTypeFont_API* AsPPB_TrueTypeFont_API() OVERRIDE;
35
36 // PPB_TrueTypeFont_API implementation.
37 virtual int32_t Describe(
38 PP_TrueTypeFontDesc_Dev* desc,
39 scoped_refptr<TrackedCallback> callback) OVERRIDE;
40 virtual int32_t GetTableTags(
41 const PP_ArrayOutput& output,
42 scoped_refptr<TrackedCallback> callback) OVERRIDE;
43 virtual int32_t GetTable(
44 uint32_t table,
45 int32_t offset,
46 int32_t max_data_length,
47 const PP_ArrayOutput& output,
48 scoped_refptr<TrackedCallback> callback) OVERRIDE;
49
50 private:
51 void OnPluginMsgDescribeComplete(
52 scoped_refptr<TrackedCallback> callback,
53 PP_TrueTypeFontDesc_Dev* pp_desc,
54 const ResourceMessageReplyParams& params,
55 const ppapi::proxy::SerializedTrueTypeFontDesc& desc);
56 void OnPluginMsgGetTableTagsComplete(
57 scoped_refptr<TrackedCallback> callback,
58 PP_ArrayOutput array_output,
59 const ResourceMessageReplyParams& params,
60 const std::vector<uint32_t>& data);
61 void OnPluginMsgGetTableComplete(
62 scoped_refptr<TrackedCallback> callback,
63 PP_ArrayOutput array_output,
64 const ResourceMessageReplyParams& params,
65 const std::string& data);
66
67 DISALLOW_COPY_AND_ASSIGN(TrueTypeFontResource);
68 };
69
70 } // namespace proxy
71 } // namespace ppapi
72
73 #endif // PPAPI_PROXY_TRUETYPE_FONT_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_structs.cc ('k') | ppapi/proxy/truetype_font_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698