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

Side by Side Diff: ppapi/proxy/serialized_structs.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/resource_creation_proxy.cc ('k') | ppapi/proxy/serialized_structs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_ 5 #ifndef PPAPI_PROXY_SERIALIZED_STRUCTS_H_
6 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_ 6 #define PPAPI_PROXY_SERIALIZED_STRUCTS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/shared_memory.h" 12 #include "base/shared_memory.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "ppapi/c/dev/ppb_truetype_font_dev.h"
14 #include "ppapi/c/pp_bool.h" 15 #include "ppapi/c/pp_bool.h"
15 #include "ppapi/c/pp_instance.h" 16 #include "ppapi/c/pp_instance.h"
16 #include "ppapi/c/pp_point.h" 17 #include "ppapi/c/pp_point.h"
17 #include "ppapi/c/pp_rect.h" 18 #include "ppapi/c/pp_rect.h"
18 #include "ppapi/proxy/ppapi_proxy_export.h" 19 #include "ppapi/proxy/ppapi_proxy_export.h"
19 #include "ppapi/shared_impl/host_resource.h" 20 #include "ppapi/shared_impl/host_resource.h"
20 21
21 class Pickle; 22 class Pickle;
22 struct PP_FontDescription_Dev; 23 struct PP_FontDescription_Dev;
23 struct PP_BrowserFont_Trusted_Description; 24 struct PP_BrowserFont_Trusted_Description;
(...skipping 25 matching lines...) Expand all
49 std::string face; 50 std::string face;
50 int32_t family; 51 int32_t family;
51 uint32_t size; 52 uint32_t size;
52 int32_t weight; 53 int32_t weight;
53 PP_Bool italic; 54 PP_Bool italic;
54 PP_Bool small_caps; 55 PP_Bool small_caps;
55 int32_t letter_spacing; 56 int32_t letter_spacing;
56 int32_t word_spacing; 57 int32_t word_spacing;
57 }; 58 };
58 59
60 struct PPAPI_PROXY_EXPORT SerializedTrueTypeFontDesc {
61 SerializedTrueTypeFontDesc();
62 ~SerializedTrueTypeFontDesc();
63
64 // Sets this to correspond to the contents of a PP_TrueTypeFontDesc_Dev.
65 //
66 // The reference count of the desc.family PP_Var will be unchanged and the
67 // caller is responsible for releasing it.
68 void SetFromPPTrueTypeFontDesc(const PP_TrueTypeFontDesc_Dev& desc);
69
70 // Converts this to a PP_FontDescription_Dev.
71 //
72 // The desc.family PP_Var will have one reference assigned to it. The caller
73 // is responsible for releasing it.
74 void CopyToPPTrueTypeFontDesc(PP_TrueTypeFontDesc_Dev* desc) const;
75
76 std::string family;
77 PP_TrueTypeFontFamily_Dev generic_family;
78 PP_TrueTypeFontStyle_Dev style;
79 PP_TrueTypeFontWeight_Dev weight;
80 PP_TrueTypeFontWidth_Dev width;
81 PP_TrueTypeFontCharset_Dev charset;
82 };
83
59 struct SerializedDirEntry { 84 struct SerializedDirEntry {
60 std::string name; 85 std::string name;
61 bool is_dir; 86 bool is_dir;
62 }; 87 };
63 88
64 struct PPAPI_PROXY_EXPORT PPBFlash_DrawGlyphs_Params { 89 struct PPAPI_PROXY_EXPORT PPBFlash_DrawGlyphs_Params {
65 PPBFlash_DrawGlyphs_Params(); 90 PPBFlash_DrawGlyphs_Params();
66 ~PPBFlash_DrawGlyphs_Params(); 91 ~PPBFlash_DrawGlyphs_Params();
67 92
68 PP_Instance instance; 93 PP_Instance instance;
(...skipping 29 matching lines...) Expand all
98 typedef base::SharedMemoryHandle ImageHandle; 123 typedef base::SharedMemoryHandle ImageHandle;
99 #else 124 #else
100 // On X Windows this is a SysV shared memory key. 125 // On X Windows this is a SysV shared memory key.
101 typedef int ImageHandle; 126 typedef int ImageHandle;
102 #endif 127 #endif
103 128
104 } // namespace proxy 129 } // namespace proxy
105 } // namespace ppapi 130 } // namespace ppapi
106 131
107 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ 132 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/proxy/serialized_structs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698