OLD | NEW |
---|---|
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 Loading... | |
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 // Converts a PP_TrueTypeFontDesc_Dev to a SerializedTrueTypeFontDescription. | |
65 // | |
66 // The reference of |family| owned by the PP_TrueTypeFontDesc_Dev will be | |
67 // unchanged and the caller is responsible for freeing it. | |
68 void SetFromPPTrueTypeFontDesc(const PP_TrueTypeFontDesc_Dev& desc); | |
69 | |
70 // Converts to a PP_FontDescription_Dev. The face name will have one ref | |
dmichael (off chromium)
2013/03/12 18:07:58
s/The face name/|desc.family|
?
bbudge
2013/03/13 01:26:50
Done. Reworked the comments.
| |
71 // assigned to it. The caller is responsible for freeing it. | |
72 void SetToPPTrueTypeFontDesc(PP_TrueTypeFontDesc_Dev* desc) const; | |
73 | |
74 std::string family; | |
75 PP_TrueTypeFontFamily_Dev generic_family; | |
76 PP_TrueTypeFontStyle_Dev style; | |
77 PP_TrueTypeFontWeight_Dev weight; | |
78 PP_TrueTypeFontWidth_Dev width; | |
79 PP_TrueTypeFontCharset_Dev charset; | |
80 }; | |
81 | |
59 struct SerializedDirEntry { | 82 struct SerializedDirEntry { |
60 std::string name; | 83 std::string name; |
61 bool is_dir; | 84 bool is_dir; |
62 }; | 85 }; |
63 | 86 |
64 struct PPAPI_PROXY_EXPORT PPBFlash_DrawGlyphs_Params { | 87 struct PPAPI_PROXY_EXPORT PPBFlash_DrawGlyphs_Params { |
65 PPBFlash_DrawGlyphs_Params(); | 88 PPBFlash_DrawGlyphs_Params(); |
66 ~PPBFlash_DrawGlyphs_Params(); | 89 ~PPBFlash_DrawGlyphs_Params(); |
67 | 90 |
68 PP_Instance instance; | 91 PP_Instance instance; |
(...skipping 29 matching lines...) Expand all Loading... | |
98 typedef base::SharedMemoryHandle ImageHandle; | 121 typedef base::SharedMemoryHandle ImageHandle; |
99 #else | 122 #else |
100 // On X Windows this is a SysV shared memory key. | 123 // On X Windows this is a SysV shared memory key. |
101 typedef int ImageHandle; | 124 typedef int ImageHandle; |
102 #endif | 125 #endif |
103 | 126 |
104 } // namespace proxy | 127 } // namespace proxy |
105 } // namespace ppapi | 128 } // namespace ppapi |
106 | 129 |
107 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ | 130 #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |
OLD | NEW |