OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 syntax = "proto2"; |
| 6 |
| 7 option optimize_for = LITE_RUNTIME; |
| 8 |
| 9 package discourse_context; |
| 10 |
| 11 message ClientDiscourseContext { |
| 12 // Displays that have been shown to the user. |
| 13 repeated Display display = 4; |
| 14 } |
| 15 |
| 16 message Display { |
| 17 // A media item in the display, e.g. a webpage. |
| 18 optional Media media = 9; |
| 19 // URI describing this content, e.g. the URL of the webpage. |
| 20 optional string uri = 10; |
| 21 // User-selected text and surrounding content. |
| 22 optional Selection selection = 13; |
| 23 } |
| 24 |
| 25 message Selection { |
| 26 // Character encoding is UTF-8. |
| 27 optional string content = 1; |
| 28 // Character offsets (inclusive, non-inclusive) into content of the selected |
| 29 // text. |
| 30 optional int32 start = 2; |
| 31 optional int32 end = 3; |
| 32 // Whether the content is URI-encoded. Needed to support older clients. |
| 33 optional bool is_uri_encoded = 4 [default=true]; |
| 34 } |
| 35 |
| 36 message Media { |
| 37 // The MIME type of the media item, which is the original encoding |
| 38 // of the page. |
| 39 optional string mime_type = 3; |
| 40 } |
OLD | NEW |