Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: content/public/common/manifest.h

Issue 1235883007: manifest: add theme_color value to the manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/manifest_manager_messages.h ('k') | content/public/common/manifest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « content/common/manifest_manager_messages.h ('k') | content/public/common/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698