Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / dom_distiller_js / package / proto / dom_distiller.proto
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 = "com.dom_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 TimingInfo {
52   optional double markup_parsing_time = 1;
53   optional double document_construction_time = 2;
54   optional double article_processing_time = 3;
55   optional double formatting_time = 4;
56   optional double total_time = 5;
57 }
58
59 message DebugInfo {
60   optional string log = 1;
61 }
62
63 message StatisticsInfo {
64   optional int32 word_count = 1;
65 }
66
67 message DomDistillerResult {
68   optional string title = 1;
69   optional DistilledContent distilled_content = 2;
70   optional PaginationInfo pagination_info = 3;
71   repeated string image_urls = 4;
72   optional MarkupInfo markup_info = 5;
73   optional TimingInfo timing_info = 6;
74   optional DebugInfo debug_info = 7;
75   optional StatisticsInfo statistics_info = 8;
76   optional string text_direction = 9;
77 }
78
79 message DomDistillerOptions {
80   // Whether to extract only the text (or to include the containing html).
81   optional bool extract_text_only = 1;
82
83   // How much debug output to dump to window.console.
84   // (0): Logs nothing
85   // (1): Text Node data for each stage of processing
86   // (2): (1) and some node visibility information
87   // (3): (2) and extracted paging information
88   optional int32 debug_level = 2;
89
90   // The original domain of the page if it's a file://, used for detecting next/prev page links
91   // which expects the same domain for both current page and paging links.
92   optional string original_domain = 3;
93 }