blob: c3dd3c2dbab18e9f453dd7377e2340d9d4f27600 [file] [log] [blame]
[email protected]a0e1adc52012-01-27 07:21:131// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]fb35dcf2010-11-14 17:08:002// 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_SERIALIZED_STRUCTS_H_
6#define PPAPI_PROXY_SERIALIZED_STRUCTS_H_
7
avie029c4132015-12-23 06:45:228#include <stdint.h>
9
[email protected]fb35dcf2010-11-14 17:08:0010#include <string>
11#include <vector>
12
[email protected]3acbbae42010-12-08 07:50:4013#include "build/build_config.h"
[email protected]fb35dcf2010-11-14 17:08:0014#include "ppapi/c/pp_bool.h"
lionel.g.landwerlin764a8c92015-11-19 01:48:0815#include "ppapi/c/pp_codecs.h"
[email protected]859a7f32011-01-15 03:44:1316#include "ppapi/c/pp_instance.h"
[email protected]fb35dcf2010-11-14 17:08:0017#include "ppapi/c/pp_point.h"
18#include "ppapi/c/pp_rect.h"
[email protected]86fbad282013-09-22 06:34:0319#include "ppapi/c/ppb_network_list.h"
[email protected]07d0a6bf2013-09-17 04:15:1020#include "ppapi/c/private/ppb_net_address_private.h"
[email protected]cb65f132012-10-09 17:06:0921#include "ppapi/proxy/ppapi_proxy_export.h"
[email protected]be0a84b2011-08-13 04:18:4422#include "ppapi/shared_impl/host_resource.h"
[email protected]fb35dcf2010-11-14 17:08:0023
[email protected]d0e3b4a2012-12-07 22:31:4424struct PP_BrowserFont_Trusted_Description;
[email protected]fb35dcf2010-11-14 17:08:0025
[email protected]4d2efd22011-08-18 21:58:0226namespace ppapi {
[email protected]fb35dcf2010-11-14 17:08:0027namespace proxy {
28
thestigd8ecc842015-11-02 22:29:0629// PP_BrowserFontDescription has to be redefined with a string in place of the
30// PP_Var used for the face name.
[email protected]f0a04c42011-08-26 22:43:2031struct PPAPI_PROXY_EXPORT SerializedFontDescription {
[email protected]aa20e062010-12-07 23:07:2732 SerializedFontDescription();
33 ~SerializedFontDescription();
34
[email protected]d0e3b4a2012-12-07 22:31:4435 void SetFromPPBrowserFontDescription(
36 const PP_BrowserFont_Trusted_Description& desc);
[email protected]fb35dcf2010-11-14 17:08:0037
[email protected]d0e3b4a2012-12-07 22:31:4438 void SetToPPBrowserFontDescription(
39 PP_BrowserFont_Trusted_Description* desc) const;
[email protected]fb35dcf2010-11-14 17:08:0040
[email protected]cb65f132012-10-09 17:06:0941 std::string face;
[email protected]fb35dcf2010-11-14 17:08:0042 int32_t family;
43 uint32_t size;
44 int32_t weight;
45 PP_Bool italic;
46 PP_Bool small_caps;
47 int32_t letter_spacing;
48 int32_t word_spacing;
49};
50
[email protected]07d0a6bf2013-09-17 04:15:1051struct PPAPI_PROXY_EXPORT SerializedNetworkInfo {
52 SerializedNetworkInfo();
53 ~SerializedNetworkInfo();
54
55 std::string name;
[email protected]86fbad282013-09-22 06:34:0356 PP_NetworkList_Type type;
57 PP_NetworkList_State state;
[email protected]07d0a6bf2013-09-17 04:15:1058 std::vector<PP_NetAddress_Private> addresses;
59 std::string display_name;
60 int mtu;
61};
62typedef std::vector<SerializedNetworkInfo> SerializedNetworkList;
63
[email protected]fb35dcf2010-11-14 17:08:0064struct SerializedDirEntry {
65 std::string name;
66 bool is_dir;
67};
68
[email protected]f24448db2011-01-27 20:40:3969struct PPBURLLoader_UpdateProgress_Params {
70 PP_Instance instance;
[email protected]be0a84b2011-08-13 04:18:4471 ppapi::HostResource resource;
[email protected]f24448db2011-01-27 20:40:3972 int64_t bytes_sent;
73 int64_t total_bytes_to_be_sent;
74 int64_t bytes_received;
75 int64_t total_bytes_to_be_received;
76};
77
[email protected]fb35dcf2010-11-14 17:08:0078} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:0279} // namespace ppapi
[email protected]fb35dcf2010-11-14 17:08:0080
[email protected]fb35dcf2010-11-14 17:08:0081#endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_