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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/strings/nullable_string16.h" | 10 #include "base/strings/nullable_string16.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // Empty if the parsing failed, the field was not present, empty or all the | 105 // Empty if the parsing failed, the field was not present, empty or all the |
106 // applications inside the array were invalid. The order of the array | 106 // applications inside the array were invalid. The order of the array |
107 // indicates the priority of the application to use. | 107 // indicates the priority of the application to use. |
108 std::vector<RelatedApplication> related_applications; | 108 std::vector<RelatedApplication> related_applications; |
109 | 109 |
110 // A boolean that is used as a hint for the user agent to say that related | 110 // A boolean that is used as a hint for the user agent to say that related |
111 // applications should be preferred over the web application. False if missing | 111 // applications should be preferred over the web application. False if missing |
112 // or there is a parsing failure. | 112 // or there is a parsing failure. |
113 bool prefer_related_applications; | 113 bool prefer_related_applications; |
114 | 114 |
| 115 // This is a 64 bit integer because we need to represent an error state. The |
| 116 // color itself should only be 32 bits long if the value is not |
| 117 // kInvalidOrMissingThemeColor and can be safely cast to SkColor if is valid. |
| 118 // Set to kInvalidOrMissingThemeColor if parsing failed or field is not |
| 119 // present. |
| 120 int64_t theme_color; |
| 121 |
115 // This is a proprietary extension of the web Manifest, double-check that it | 122 // This is a proprietary extension of the web Manifest, double-check that it |
116 // is okay to use this entry. | 123 // is okay to use this entry. |
117 // Null if parsing failed or the field was not present. | 124 // Null if parsing failed or the field was not present. |
118 base::NullableString16 gcm_sender_id; | 125 base::NullableString16 gcm_sender_id; |
119 | 126 |
120 // Maximum length for all the strings inside the Manifest when it is sent over | 127 // Maximum length for all the strings inside the Manifest when it is sent over |
121 // IPC. The renderer process should truncate the strings before sending the | 128 // IPC. The renderer process should truncate the strings before sending the |
122 // Manifest and the browser process must do the same when receiving it. | 129 // Manifest and the browser process must do the same when receiving it. |
123 static const size_t kMaxIPCStringLength; | 130 static const size_t kMaxIPCStringLength; |
| 131 |
| 132 // Constant representing an invalid theme color. Set to -1. |
| 133 static const int64_t kInvalidOrMissingThemeColor; |
124 }; | 134 }; |
125 | 135 |
126 } // namespace content | 136 } // namespace content |
127 | 137 |
128 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ | 138 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ |
OLD | NEW |