OLD | NEW |
| (Empty) |
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. | |
4 | |
5 syntax = "proto2"; | |
6 | |
7 package dom_distiller.proto; | |
8 option optimize_for = LITE_RUNTIME; | |
9 option java_package = "org.chromium.distiller.proto"; | |
10 option java_outer_classname = "DomDistillerProtos"; | |
11 | |
12 message DistilledContent { | |
13 optional string html = 1; | |
14 } | |
15 | |
16 message PaginationInfo { | |
17 optional string next_page = 1; | |
18 optional string prev_page = 2; | |
19 optional string canonical_page = 3; | |
20 } | |
21 | |
22 message MarkupArticle { | |
23 optional string published_time = 1; | |
24 optional string modified_time = 2; | |
25 optional string expiration_time = 3; | |
26 optional string section = 4; | |
27 repeated string authors = 5; | |
28 } | |
29 | |
30 message MarkupImage { | |
31 optional string url = 1; | |
32 optional string secure_url = 2; | |
33 optional string type = 3; | |
34 optional string caption = 4; | |
35 optional int32 width = 5; | |
36 optional int32 height = 6; | |
37 } | |
38 | |
39 message MarkupInfo { | |
40 optional string title = 1; | |
41 optional string type = 2; | |
42 optional string url = 3; | |
43 optional string description = 4; | |
44 optional string publisher = 5; | |
45 optional string copyright = 6; | |
46 optional string author = 7; | |
47 optional MarkupArticle article = 8; | |
48 repeated MarkupImage images = 9; | |
49 } | |
50 | |
51 message TimingEntry { | |
52 optional string name = 1; | |
53 optional double time = 2; | |
54 } | |
55 | |
56 message TimingInfo { | |
57 optional double markup_parsing_time = 1; | |
58 optional double document_construction_time = 2; | |
59 optional double article_processing_time = 3; | |
60 optional double formatting_time = 4; | |
61 optional double total_time = 5; | |
62 | |
63 // A place to hold arbitrary breakdowns of time. The perf scoring/server | |
64 // should display these entries with appropriate names. | |
65 repeated TimingEntry other_times = 6; | |
66 } | |
67 | |
68 message DebugInfo { | |
69 optional string log = 1; | |
70 } | |
71 | |
72 message StatisticsInfo { | |
73 optional int32 word_count = 1; | |
74 } | |
75 | |
76 message DomDistillerResult { | |
77 optional string title = 1; | |
78 optional DistilledContent distilled_content = 2; | |
79 optional PaginationInfo pagination_info = 3; | |
80 optional MarkupInfo markup_info = 5; | |
81 optional TimingInfo timing_info = 6; | |
82 optional DebugInfo debug_info = 7; | |
83 optional StatisticsInfo statistics_info = 8; | |
84 optional string text_direction = 9; | |
85 | |
86 // Represents an image found in the content of a page. | |
87 message ContentImage { | |
88 optional string url = 1; | |
89 } | |
90 | |
91 repeated ContentImage content_images = 10; | |
92 } | |
93 | |
94 message DomDistillerOptions { | |
95 // Whether to extract only the text (or to include the containing html). | |
96 optional bool extract_text_only = 1; | |
97 | |
98 // How much debug output to dump to window.console. | |
99 // (0): Logs nothing | |
100 // (1): Text Node data for each stage of processing | |
101 // (2): (1) and some node visibility information | |
102 // (3): (2) and extracted paging information | |
103 optional int32 debug_level = 2; | |
104 | |
105 // The original URL of the page, which is used in the heuristics in | |
106 // detecting next/prev page links. | |
107 optional string original_url = 3; | |
108 } | |
OLD | NEW |