[email protected] | a0e1adc5 | 2012-01-27 07:21:13 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 2 | // 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 | |||||
avi | e029c413 | 2015-12-23 06:45:22 | [diff] [blame] | 8 | #include <stdint.h> |
9 | |||||
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 10 | #include <string> |
11 | #include <vector> | ||||
12 | |||||
[email protected] | 3acbbae4 | 2010-12-08 07:50:40 | [diff] [blame] | 13 | #include "build/build_config.h" |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 14 | #include "ppapi/c/pp_bool.h" |
lionel.g.landwerlin | 764a8c9 | 2015-11-19 01:48:08 | [diff] [blame] | 15 | #include "ppapi/c/pp_codecs.h" |
[email protected] | 859a7f3 | 2011-01-15 03:44:13 | [diff] [blame] | 16 | #include "ppapi/c/pp_instance.h" |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 17 | #include "ppapi/c/pp_point.h" |
18 | #include "ppapi/c/pp_rect.h" | ||||
[email protected] | 86fbad28 | 2013-09-22 06:34:03 | [diff] [blame] | 19 | #include "ppapi/c/ppb_network_list.h" |
[email protected] | 07d0a6bf | 2013-09-17 04:15:10 | [diff] [blame] | 20 | #include "ppapi/c/private/ppb_net_address_private.h" |
[email protected] | cb65f13 | 2012-10-09 17:06:09 | [diff] [blame] | 21 | #include "ppapi/proxy/ppapi_proxy_export.h" |
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 22 | #include "ppapi/shared_impl/host_resource.h" |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 23 | |
[email protected] | d0e3b4a | 2012-12-07 22:31:44 | [diff] [blame] | 24 | struct PP_BrowserFont_Trusted_Description; |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 25 | |
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 26 | namespace ppapi { |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 27 | namespace proxy { |
28 | |||||
thestig | d8ecc84 | 2015-11-02 22:29:06 | [diff] [blame] | 29 | // PP_BrowserFontDescription has to be redefined with a string in place of the |
30 | // PP_Var used for the face name. | ||||
[email protected] | f0a04c4 | 2011-08-26 22:43:20 | [diff] [blame] | 31 | struct PPAPI_PROXY_EXPORT SerializedFontDescription { |
[email protected] | aa20e06 | 2010-12-07 23:07:27 | [diff] [blame] | 32 | SerializedFontDescription(); |
33 | ~SerializedFontDescription(); | ||||
34 | |||||
[email protected] | d0e3b4a | 2012-12-07 22:31:44 | [diff] [blame] | 35 | void SetFromPPBrowserFontDescription( |
36 | const PP_BrowserFont_Trusted_Description& desc); | ||||
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 37 | |
[email protected] | d0e3b4a | 2012-12-07 22:31:44 | [diff] [blame] | 38 | void SetToPPBrowserFontDescription( |
39 | PP_BrowserFont_Trusted_Description* desc) const; | ||||
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 40 | |
[email protected] | cb65f13 | 2012-10-09 17:06:09 | [diff] [blame] | 41 | std::string face; |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 42 | 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] | 07d0a6bf | 2013-09-17 04:15:10 | [diff] [blame] | 51 | struct PPAPI_PROXY_EXPORT SerializedNetworkInfo { |
52 | SerializedNetworkInfo(); | ||||
53 | ~SerializedNetworkInfo(); | ||||
54 | |||||
55 | std::string name; | ||||
[email protected] | 86fbad28 | 2013-09-22 06:34:03 | [diff] [blame] | 56 | PP_NetworkList_Type type; |
57 | PP_NetworkList_State state; | ||||
[email protected] | 07d0a6bf | 2013-09-17 04:15:10 | [diff] [blame] | 58 | std::vector<PP_NetAddress_Private> addresses; |
59 | std::string display_name; | ||||
60 | int mtu; | ||||
61 | }; | ||||
62 | typedef std::vector<SerializedNetworkInfo> SerializedNetworkList; | ||||
63 | |||||
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 64 | struct SerializedDirEntry { |
65 | std::string name; | ||||
66 | bool is_dir; | ||||
67 | }; | ||||
68 | |||||
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 69 | struct PPBURLLoader_UpdateProgress_Params { |
70 | PP_Instance instance; | ||||
[email protected] | be0a84b | 2011-08-13 04:18:44 | [diff] [blame] | 71 | ppapi::HostResource resource; |
[email protected] | f24448db | 2011-01-27 20:40:39 | [diff] [blame] | 72 | 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] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 78 | } // namespace proxy |
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 79 | } // namespace ppapi |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 80 | |
[email protected] | fb35dcf | 2010-11-14 17:08:00 | [diff] [blame] | 81 | #endif // PPAPI_PROXY_SERIALIZED_STRUCTS_H_ |