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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_MANIFEST_H_
6 #define CONTENT_PUBLIC_COMMON_MANIFEST_H_
8 #include "base/strings/nullable_string16.h"
9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
15 // The Manifest structure is an internal representation of the Manifest file
16 // described in the "Manifest for Web Application" document:
17 // http://w3c.github.io/manifest/
18 struct CONTENT_EXPORT Manifest
{
20 DISPLAY_MODE_UNSPECIFIED
,
21 DISPLAY_MODE_FULLSCREEN
,
22 DISPLAY_MODE_STANDALONE
,
23 DISPLAY_MODE_MINIMAL_UI
,
30 // Returns whether this Manifest had no attribute set. A newly created
31 // Manifest is always empty.
34 // Null if the parsing failed or the field was not present.
35 base::NullableString16 name
;
37 // Null if the parsing failed or the field was not present.
38 base::NullableString16 short_name
;
40 // Empty if the parsing failed or the field was not present.
43 // Set to DISPLAY_MODE_UNSPECIFIED if the parsing failed or the field was not
47 // Set to blink::WebScreenOrientationLockDefault if the parsing failed or the
48 // field was not present.
49 blink::WebScreenOrientationLockType orientation
;
51 // Maximum length for all the strings inside the Manifest when it is sent over
52 // IPC. The renderer process should truncate the strings before sending the
53 // Manifest and the browser process must do the same when receiving it.
54 static const size_t kMaxIPCStringLength
;
57 } // namespace content
59 #endif // CONTENT_PUBLIC_COMMON_MANIFEST_H_