OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_PUBLIC_COMMON_MANIFEST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MANIFEST_H_ |
6 #define CONTENT_PUBLIC_COMMON_MANIFEST_H_ | 6 #define CONTENT_PUBLIC_COMMON_MANIFEST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 // Empty if the parsing failed, the field was not present or empty. | 51 // Empty if the parsing failed, the field was not present or empty. |
52 // The special value "any" is represented by gfx::Size(0, 0). | 52 // The special value "any" is represented by gfx::Size(0, 0). |
53 std::vector<gfx::Size> sizes; | 53 std::vector<gfx::Size> sizes; |
54 | 54 |
55 // Empty if the field was not present or not of type "string". Defaults to | 55 // Empty if the field was not present or not of type "string". Defaults to |
56 // a vector with a single value, IconPurpose::ANY, for all other parsing | 56 // a vector with a single value, IconPurpose::ANY, for all other parsing |
57 // exceptions. | 57 // exceptions. |
58 std::vector<IconPurpose> purpose; | 58 std::vector<IconPurpose> purpose; |
59 }; | 59 }; |
60 | 60 |
61 // Structure representing how a Web Share target handles an incoming share. | |
62 struct CONTENT_EXPORT ShareTarget { | |
63 ShareTarget(); | |
64 ~ShareTarget(); | |
65 | |
66 bool is_null() const; | |
67 | |
68 // The URL template that contains placeholders to be replaced with shared | |
69 // data. Null if the parsing failed. | |
70 base::NullableString16 url_template; | |
71 }; | |
72 | |
61 // Structure representing a related application. | 73 // Structure representing a related application. |
62 struct CONTENT_EXPORT RelatedApplication { | 74 struct CONTENT_EXPORT RelatedApplication { |
63 RelatedApplication(); | 75 RelatedApplication(); |
64 ~RelatedApplication(); | 76 ~RelatedApplication(); |
65 | 77 |
66 // The platform on which the application can be found. This can be any | 78 // The platform on which the application can be found. This can be any |
67 // string, and is interpreted by the consumer of the object. Empty if the | 79 // string, and is interpreted by the consumer of the object. Empty if the |
68 // parsing failed. | 80 // parsing failed. |
69 base::NullableString16 platform; | 81 base::NullableString16 platform; |
70 | 82 |
(...skipping 29 matching lines...) Expand all Loading... | |
100 blink::WebDisplayMode display; | 112 blink::WebDisplayMode display; |
101 | 113 |
102 // Set to blink::WebScreenOrientationLockDefault if the parsing failed or the | 114 // Set to blink::WebScreenOrientationLockDefault if the parsing failed or the |
103 // field was not present. | 115 // field was not present. |
104 blink::WebScreenOrientationLockType orientation; | 116 blink::WebScreenOrientationLockType orientation; |
105 | 117 |
106 // Empty if the parsing failed, the field was not present, empty or all the | 118 // Empty if the parsing failed, the field was not present, empty or all the |
107 // icons inside the JSON array were invalid. | 119 // icons inside the JSON array were invalid. |
108 std::vector<Icon> icons; | 120 std::vector<Icon> icons; |
109 | 121 |
122 // Null if parsing failed or the field was not present. | |
Matt Giuca
2017/01/23 00:18:06
Document that this field is non-standard and part
mlamouri (slow - plz ping)
2017/01/23 00:22:26
Could you say that this should not be exposed to w
constantina
2017/01/23 02:51:36
Done.
constantina
2017/01/23 02:51:36
Done.
| |
123 ShareTarget share_target; | |
mlamouri (slow - plz ping)
2017/01/23 00:22:26
Would it make sense to use base::optional<> here?
constantina
2017/01/23 02:51:36
Yes, it would. Done.
| |
124 | |
110 // Empty if the parsing failed, the field was not present, empty or all the | 125 // Empty if the parsing failed, the field was not present, empty or all the |
111 // applications inside the array were invalid. The order of the array | 126 // applications inside the array were invalid. The order of the array |
112 // indicates the priority of the application to use. | 127 // indicates the priority of the application to use. |
113 std::vector<RelatedApplication> related_applications; | 128 std::vector<RelatedApplication> related_applications; |
114 | 129 |
115 // A boolean that is used as a hint for the user agent to say that related | 130 // A boolean that is used as a hint for the user agent to say that related |
116 // applications should be preferred over the web application. False if missing | 131 // applications should be preferred over the web application. False if missing |
117 // or there is a parsing failure. | 132 // or there is a parsing failure. |
118 bool prefer_related_applications; | 133 bool prefer_related_applications; |
119 | 134 |
(...skipping 25 matching lines...) Expand all Loading... | |
145 static const size_t kMaxIPCStringLength; | 160 static const size_t kMaxIPCStringLength; |
146 | 161 |
147 // Constant representing an invalid color. Set to a value outside the | 162 // Constant representing an invalid color. Set to a value outside the |
148 // range of a 32-bit integer. | 163 // range of a 32-bit integer. |
149 static const int64_t kInvalidOrMissingColor; | 164 static const int64_t kInvalidOrMissingColor; |
150 }; | 165 }; |
151 | 166 |
152 } // namespace content | 167 } // namespace content |
153 | 168 |
154 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ | 169 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ |
OLD | NEW |