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

Side by Side Diff: content/renderer/manifest/manifest_parser.h

Issue 1901363003: Remove support for the web manifest icon density member. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename test Created 4 years, 8 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/public/common/manifest.cc ('k') | content/renderer/manifest/manifest_parser.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_RENDERER_MANIFEST_MANIFEST_PARSER_H_ 5 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ 6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Parses the 'src' field of an icon, as defined in: 119 // Parses the 'src' field of an icon, as defined in:
120 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-src-member-of-a n-icon 120 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-src-member-of-a n-icon
121 // Returns the parsed GURL if any, an empty GURL if the parsing failed. 121 // Returns the parsed GURL if any, an empty GURL if the parsing failed.
122 GURL ParseIconSrc(const base::DictionaryValue& icon); 122 GURL ParseIconSrc(const base::DictionaryValue& icon);
123 123
124 // Parses the 'type' field of an icon, as defined in: 124 // Parses the 'type' field of an icon, as defined in:
125 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-type-member-of- an-icon 125 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-type-member-of- an-icon
126 // Returns the parsed string if any, a null string if the parsing failed. 126 // Returns the parsed string if any, a null string if the parsing failed.
127 base::NullableString16 ParseIconType(const base::DictionaryValue& icon); 127 base::NullableString16 ParseIconType(const base::DictionaryValue& icon);
128 128
129 // Parses the 'density' field of an icon, as defined in:
130 // http://w3c.github.io/manifest/#dfn-steps-for-processing-a-density-member-of -an-icon
131 // Returns the parsed double if any, Manifest::Icon::kDefaultDensity if the
132 // parsing failed.
133 double ParseIconDensity(const base::DictionaryValue& icon);
134
135 // Parses the 'sizes' field of an icon, as defined in: 129 // Parses the 'sizes' field of an icon, as defined in:
136 // http://w3c.github.io/manifest/#dfn-steps-for-processing-a-sizes-member-of-a n-icon 130 // http://w3c.github.io/manifest/#dfn-steps-for-processing-a-sizes-member-of-a n-icon
137 // Returns a vector of gfx::Size with the successfully parsed sizes, if any. 131 // Returns a vector of gfx::Size with the successfully parsed sizes, if any.
138 // An empty vector if the field was not present or empty. "Any" is represented 132 // An empty vector if the field was not present or empty. "Any" is represented
139 // by gfx::Size(0, 0). 133 // by gfx::Size(0, 0).
140 std::vector<gfx::Size> ParseIconSizes(const base::DictionaryValue& icon); 134 std::vector<gfx::Size> ParseIconSizes(const base::DictionaryValue& icon);
141 135
142 // Parses the 'icons' field of a Manifest, as defined in: 136 // Parses the 'icons' field of a Manifest, as defined in:
143 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-icons-member 137 // http://w3c.github.io/manifest/#dfn-steps-for-processing-the-icons-member
144 // Returns a vector of Manifest::Icon with the successfully parsed icons, if 138 // Returns a vector of Manifest::Icon with the successfully parsed icons, if
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 bool failed_; 200 bool failed_;
207 Manifest manifest_; 201 Manifest manifest_;
208 std::vector<std::unique_ptr<ErrorInfo>> errors_; 202 std::vector<std::unique_ptr<ErrorInfo>> errors_;
209 203
210 DISALLOW_COPY_AND_ASSIGN(ManifestParser); 204 DISALLOW_COPY_AND_ASSIGN(ManifestParser);
211 }; 205 };
212 206
213 } // namespace content 207 } // namespace content
214 208
215 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_ 209 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_PARSER_H_
OLDNEW
« no previous file with comments | « content/public/common/manifest.cc ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698