Home | History | Annotate | Download | only in proto
      1 // Copyright 2009 Google Inc. All Rights Reserved.
      2 // Author: morgwai (a] google.com (Morgwai Kotarbinski)
      3 //
      4 // Messages sent from extension to feedback server as JSON.
      5 
      6 syntax = "proto2";
      7 
      8 option optimize_for = LITE_RUNTIME;
      9 
     10 package userfeedback;
     11 
     12 import "common.proto";
     13 import "chrome.proto";
     14 import "dom.proto";
     15 import "math.proto";
     16 import "web.proto";
     17 
     18 // Sent along with request for extension page when user attempts to open
     19 // feedback tab.
     20 message ExtensionPageRequestParams {
     21 
     22   required ExtensionDetails extension_details = 1;
     23 
     24   // Url of the page (without request params) that user wants to open
     25   // feedback tool for.
     26   required string url = 2;
     27 };
     28 
     29 message PostedScreenshot {
     30 
     31   required string mime_type = 1;
     32 
     33   required Dimensions dimensions = 2;
     34 
     35   optional string base64_content = 3;
     36 
     37   optional bytes binary_content = 4;
     38 };
     39 
     40 // Contains data about possible errors on the client side.
     41 // Describes number of attempts to send feedback and possible error codes/
     42 // exceptions which occured.
     43 message ExtensionErrors {
     44 
     45   required int32 number_of_attempts = 1;
     46 
     47   required string errors = 2;
     48 };
     49 
     50 // Sent when user hits final submit button in external extension.
     51 // NOTE: Field numbers for ExternalExtensionSubmit and InternalExtensionSubmit
     52 // share the same number space, because we don't want submission from internal
     53 // extension to the external address, or submission from external extension to
     54 // internal address, work by accident, partially work, or break in an odd way.
     55 // If the field numbers were overlapping for both protos, such cross-submission
     56 // might work, due to the specifics of JsPbLite.
     57 message ExternalExtensionSubmit {
     58 
     59   required CommonData common_data = 1;
     60 
     61   required WebData web_data = 2;
     62 
     63   required int32 type_id = 3;
     64 
     65   optional PostedScreenshot screenshot = 4;
     66 
     67   optional HtmlDocument html_document_structure = 5;
     68 
     69   optional ExtensionErrors extension_errors = 13;
     70 
     71   optional ChromeData chrome_data = 14;
     72 
     73   repeated ProductSpecificBinaryData product_specific_binary_data = 15;
     74 };
     75 
     76 // Sent when user hits final submit button in internal extension.
     77 // NOTE: Field numbers for ExternalExtensionSubmit and InternalExtensionSubmit
     78 // share the same number space. See comment for ExternalExtensionSubmit.
     79 message InternalExtensionSubmit {
     80 
     81   required CommonData common_data = 6;
     82 
     83   required WebData web_data = 7;
     84 
     85   optional int32 type_id = 8;
     86 
     87   optional PostedScreenshot screenshot = 9;
     88 
     89   optional HtmlDocument html_document_structure = 10;
     90 
     91   optional InternalWebData internal_data = 11;
     92 
     93   optional ExtensionErrors extension_errors = 12;
     94 
     95   repeated ProductSpecificBinaryData product_specific_binary_data = 15;
     96 };
     97 
     98 // A query for suggestions, sent when the user hits the preview button.
     99 message SuggestQuery {
    100 
    101   required CommonData common_data = 1;
    102 
    103   required WebData web_data = 2;
    104 
    105   required int32 type_id = 3;
    106 
    107   optional HtmlDocument html_document_structure = 4;
    108 };
    109