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

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

Issue 591073002: Add support for Manifest.icons.sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_icons
Patch Set: rebase Created 6 years, 2 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
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"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" 12 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
13 #include "ui/gfx/geometry/size.h"
13 #include "url/gurl.h" 14 #include "url/gurl.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 // The Manifest structure is an internal representation of the Manifest file 18 // The Manifest structure is an internal representation of the Manifest file
18 // described in the "Manifest for Web Application" document: 19 // described in the "Manifest for Web Application" document:
19 // http://w3c.github.io/manifest/ 20 // http://w3c.github.io/manifest/
20 struct CONTENT_EXPORT Manifest { 21 struct CONTENT_EXPORT Manifest {
21 enum DisplayMode { 22 enum DisplayMode {
22 DISPLAY_MODE_UNSPECIFIED, 23 DISPLAY_MODE_UNSPECIFIED,
(...skipping 15 matching lines...) Expand all
38 39
39 // Null if the parsing failed or the field was not present. The type can be 40 // Null if the parsing failed or the field was not present. The type can be
40 // any string and doesn't have to be a valid image MIME type at this point. 41 // any string and doesn't have to be a valid image MIME type at this point.
41 // It is up to the consumer of the object to check if the type matches a 42 // It is up to the consumer of the object to check if the type matches a
42 // supported type. 43 // supported type.
43 base::NullableString16 type; 44 base::NullableString16 type;
44 45
45 // Default value is 1.0 if the value is missing or invalid. 46 // Default value is 1.0 if the value is missing or invalid.
46 double density; 47 double density;
47 48
49 // Empty if the parsing failed, the field was not present or empty.
50 // The special value "any" is represented by gfx::Size(0, 0).
51 std::vector<gfx::Size> sizes;
52
48 // Default density. Set to 1.0. 53 // Default density. Set to 1.0.
49 static const double kDefaultDensity; 54 static const double kDefaultDensity;
50 }; 55 };
51 56
52 Manifest(); 57 Manifest();
53 ~Manifest(); 58 ~Manifest();
54 59
55 // Returns whether this Manifest had no attribute set. A newly created 60 // Returns whether this Manifest had no attribute set. A newly created
56 // Manifest is always empty. 61 // Manifest is always empty.
57 bool IsEmpty() const; 62 bool IsEmpty() const;
(...skipping 21 matching lines...) Expand all
79 84
80 // Maximum length for all the strings inside the Manifest when it is sent over 85 // Maximum length for all the strings inside the Manifest when it is sent over
81 // IPC. The renderer process should truncate the strings before sending the 86 // IPC. The renderer process should truncate the strings before sending the
82 // Manifest and the browser process must do the same when receiving it. 87 // Manifest and the browser process must do the same when receiving it.
83 static const size_t kMaxIPCStringLength; 88 static const size_t kMaxIPCStringLength;
84 }; 89 };
85 90
86 } // namespace content 91 } // namespace content
87 92
88 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_ 93 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_
OLDNEW
« no previous file with comments | « content/common/manifest_manager_messages.h ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698