Removing uses of X11 native key events.
[chromium-blink-merge.git] / content / public / common / manifest.h
blob35a49b138a68b490365b8cd93e0b0eb55952d9d5
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"
11 #include "url/gurl.h"
13 namespace content {
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 {
19 enum DisplayMode {
20 DISPLAY_MODE_UNSPECIFIED,
21 DISPLAY_MODE_FULLSCREEN,
22 DISPLAY_MODE_STANDALONE,
23 DISPLAY_MODE_MINIMAL_UI,
24 DISPLAY_MODE_BROWSER
27 Manifest();
28 ~Manifest();
30 // Returns whether this Manifest had no attribute set. A newly created
31 // Manifest is always empty.
32 bool IsEmpty() const;
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.
41 GURL start_url;
43 // Set to DISPLAY_MODE_UNSPECIFIED if the parsing failed or the field was not
44 // present.
45 DisplayMode display;
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_