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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/serialized_structs.h
diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h
index dcb99817193ae1d850fdc02747fbbe4ffc3fb856..a2a873e39cd7971518e27248b576f6ab1a91428c 100644
--- a/ppapi/proxy/serialized_structs.h
+++ b/ppapi/proxy/serialized_structs.h
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/shared_memory.h"
#include "build/build_config.h"
+#include "ppapi/c/dev/ppb_truetype_font_dev.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_point.h"
@@ -56,6 +57,28 @@ struct PPAPI_PROXY_EXPORT SerializedFontDescription {
int32_t word_spacing;
};
+struct PPAPI_PROXY_EXPORT SerializedTrueTypeFontDesc {
+ SerializedTrueTypeFontDesc();
+ ~SerializedTrueTypeFontDesc();
+
+ // Converts a PP_TrueTypeFontDesc_Dev to a SerializedTrueTypeFontDescription.
+ //
+ // The reference of |family| owned by the PP_TrueTypeFontDesc_Dev will be
+ // unchanged and the caller is responsible for freeing it.
+ void SetFromPPTrueTypeFontDesc(const PP_TrueTypeFontDesc_Dev& desc);
+
+ // 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.
+ // assigned to it. The caller is responsible for freeing it.
+ void SetToPPTrueTypeFontDesc(PP_TrueTypeFontDesc_Dev* desc) const;
+
+ std::string family;
+ PP_TrueTypeFontFamily_Dev generic_family;
+ PP_TrueTypeFontStyle_Dev style;
+ PP_TrueTypeFontWeight_Dev weight;
+ PP_TrueTypeFontWidth_Dev width;
+ PP_TrueTypeFontCharset_Dev charset;
+};
+
struct SerializedDirEntry {
std::string name;
bool is_dir;

Powered by Google App Engine
This is Rietveld 408576698