| // Copyright 2020 The Chromium Authors. All rights reserved. | 
 | // Use of this source code is governed by a BSD-style license that can be | 
 | // found in the LICENSE file. | 
 |  | 
 | syntax = "proto2"; | 
 |  | 
 | option optimize_for = LITE_RUNTIME; | 
 |  | 
 | package web_app; | 
 |  | 
 | // A proto representing a ShareTargetParamsFile | 
 | // https://w3c.github.io/web-share-target/level-2/#sharetargetfiles-and-its-members | 
 | message ShareTargetParamsFile { | 
 |   required string name = 1; | 
 |   repeated string accept = 2; | 
 | } | 
 |  | 
 | // A proto representing ShareTargetParams | 
 | // https://w3c.github.io/web-share-target/#dom-sharetargetparams | 
 | // Each field corresponds to key in ShareData. These are the query parameter | 
 | // keys to be used for the data supplied in a ShareData instance. | 
 | // ShareData: https://w3c.github.io/web-share#dom-sharedata | 
 | message ShareTargetParams { | 
 |   optional string title = 1; | 
 |   optional string text = 2; | 
 |   optional string url = 3; | 
 |   repeated ShareTargetParamsFile files = 4; | 
 | } | 
 |  | 
 | // A proto representing a ShareTarget. | 
 | // https://w3c.github.io/web-share-target/#dom-sharetarget | 
 | message ShareTarget { | 
 |   // Proto version of apps::ShareTarget::Method. | 
 |   // NEVER change these numbers or re-use old ones; only add new ones. | 
 |   enum Method { | 
 |     GET = 0; | 
 |     POST = 1; | 
 |   }; | 
 |  | 
 |   // Proto version of apps::ShareTarget::Enctype. | 
 |   // NEVER change these numbers or re-use old ones; only add new ones. | 
 |   enum Enctype { | 
 |     FORM_URL_ENCODED = 0; | 
 |     MULTIPART_FORM_DATA = 1; | 
 |   }; | 
 |  | 
 |   // The URL to be resolved when sharing. | 
 |   required string action = 1; | 
 |   required Method method = 2; | 
 |   required Enctype enctype = 3; | 
 |   required ShareTargetParams params = 4; | 
 | } |