Introduce PPB_Flash_Font.
It is a subset of PPB_PDF and shares the implementation with some PPB_PDF methods. With this interface, Pepper Flash doesn't need to depend on PPB_PDF.
BUG=None
TEST=None
Review URL: https://codereview.chromium.org/10905227
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160861 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/proxy/serialized_structs.h b/ppapi/proxy/serialized_structs.h
index ac9494d3..1779fd8 100644
--- a/ppapi/proxy/serialized_structs.h
+++ b/ppapi/proxy/serialized_structs.h
@@ -16,7 +16,7 @@
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_rect.h"
-#include "ppapi/proxy/serialized_var.h"
+#include "ppapi/proxy/ppapi_proxy_export.h"
#include "ppapi/shared_impl/host_resource.h"
class Pickle;
@@ -25,39 +25,23 @@
namespace ppapi {
namespace proxy {
-class Dispatcher;
-
-// PP_FontDescript_Dev has to be redefined with a SerializedVar in place of
-// the PP_Var used for the face name.
+// PP_FontDescript_Dev has to be redefined with a string in place of the PP_Var
+// used for the face name.
struct PPAPI_PROXY_EXPORT SerializedFontDescription {
SerializedFontDescription();
~SerializedFontDescription();
// Converts a PP_FontDescription_Dev to a SerializedFontDescription.
//
- // If source_owns_ref is true, the reference owned by the
- // PP_FontDescription_Dev will be unchanged and the caller is responsible for
- // freeing it. When false, the SerializedFontDescription will take ownership
- // of the ref. This is the difference between serializing as an input value
- // (owns_ref = true) and an output value (owns_ref = true).
- void SetFromPPFontDescription(Dispatcher* dispatcher,
- const PP_FontDescription_Dev& desc,
- bool source_owns_ref);
+ // The reference of |face| owned by the PP_FontDescription_Dev will be
+ // unchanged and the caller is responsible for freeing it.
+ void SetFromPPFontDescription(const PP_FontDescription_Dev& desc);
// Converts to a PP_FontDescription_Dev. The face name will have one ref
- // assigned to it on behalf of the caller.
- //
- // If dest_owns_ref is set, the resulting PP_FontDescription_Dev will keep a
- // reference to any strings we made on its behalf even when the
- // SerializedFontDescription goes away. When false, ownership of the ref will
- // stay with the SerializedFontDescription and the PP_FontDescription_Dev
- // will just refer to that one. This is the difference between deserializing
- // as an input value (owns_ref = false) and an output value (owns_ref = true).
- void SetToPPFontDescription(Dispatcher* dispatcher,
- PP_FontDescription_Dev* desc,
- bool dest_owns_ref) const;
+ // assigned to it. The caller is responsible for freeing it.
+ void SetToPPFontDescription(PP_FontDescription_Dev* desc) const;
- SerializedVar face;
+ std::string face;
int32_t family;
uint32_t size;
int32_t weight;