OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 |
| 5 module blink.mojom; |
| 6 |
| 7 import "url/mojo/url.mojom"; |
| 8 |
| 9 // Due to the restriction of AppIndexing, all elements should be of the |
| 10 // same type. Non-array values are converted to arrays of one element. |
| 11 union Values { |
| 12 array<bool> bool_values; |
| 13 array<int64> long_values; |
| 14 array<string> string_values; |
| 15 array<Entity> entity_values; |
| 16 }; |
| 17 |
| 18 // Key-value pair for the attributes of an |Entity|. |
| 19 struct Property { |
| 20 string name; |
| 21 Values values; |
| 22 }; |
| 23 |
| 24 // Top-level metadata entry using schema.org vocabulary. |
| 25 // Tree structure of entities is possible. |
| 26 // Ref: https://developers.google.com/schemas/formats/json-ld |
| 27 struct Entity { |
| 28 string type; // Correspond to the "@type" key, defined in JSON-LD. |
| 29 array<Property> properties; |
| 30 }; |
| 31 |
| 32 struct WebPage { |
| 33 url.mojom.Url url; |
| 34 string title; |
| 35 array<Entity> entities; |
| 36 }; |
OLD | NEW |