1// Copyright 2020 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.
4
5module chrome.mojom;
6
7import "mojo/public/mojom/base/string16.mojom";
8import "url/mojom/url.mojom";
9
10enum WebPageMobileCapable {
11  UNSPECIFIED,
12  ENABLED,       // If <meta name="mobile-web-app-capable" content="yes">
13  ENABLED_APPLE  // If <meta name="apple-mobile-web-app-capable" content="yes">
14};
15
16// Corresponding to a <link rel="icon"...> tag (or other such tags) which
17// optionally specifies an icon size.
18struct WebPageIconInfo {
19  url.mojom.Url url;
20  int32 square_size_px;  // 0 if unspecified.
21};
22
23// Extracted from web page specified meta data.
24struct WebPageMetadata {
25  // Extracted from a <meta name="application-name" ...> tag if any.
26  mojo_base.mojom.String16 application_name;
27
28  // Extracted from a <meta name="description" ...> tag if any.
29  mojo_base.mojom.String16 description;
30
31  // Extracted from a <meta name="application-url" ...> tag if any.
32  url.mojom.Url application_url;
33
34  // Extracted from all <link rel="icon"...> tags and other such tags that
35  // specify icons.
36  array<WebPageIconInfo> icons;
37
38  // Extracted from a <meta name="{apple-}mobile-web-app-capable"...> tag if
39  // specified.
40  WebPageMobileCapable mobile_capable = WebPageMobileCapable.UNSPECIFIED;
41};
42