web_page_metadata.mojom 1.3 KB

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