File: web_app_specifics.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (99 lines) | stat: -rw-r--r-- 3,705 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// If you change or add any fields in this file, update
// components/sync/protocol/proto_visitors.h and potentially
// components/sync/protocol/proto_enum_conversions.{h, cc}.

syntax = "proto2";

option java_multiple_files = true;
option java_package = "org.chromium.components.sync.protocol";

option optimize_for = LITE_RUNTIME;

package sync_pb;

// Sync & local data: Information about web app icon.
message WebAppIconInfo {
  enum Purpose {
    UNSPECIFIED = 0;
    // Suitable for any purpose.
    ANY = 1;
    // Designed for masking.
    MASKABLE = 2;
    // Suitable for monochrome purposes.
    MONOCHROME = 3;
  }

  // The size of the square app icon, in raw pixels.
  optional int32 size_in_px = 1;
  // The URL of the app icon.
  optional string url = 2;
  // The purpose or context in which the icon should be used.
  optional Purpose purpose = 3;
}

// WebApp data. This is a synced part of
// chrome/browser/web_applications/proto/web_app.proto data.
// Note: Pre-M125 clients will incorrectly drop any unrecognized new fields
// added to the proto. Handling should be added to ApplySyncDataToApp in
// web_app_sync_bridge.cc if new fields need to be preserved.
message WebAppSpecifics {
  // This enum should be a subset of the DisplayMode enum in
  // chrome/browser/web_applications/proto/web_app.proto and
  // third_party/blink/public/mojom/manifest/display_mode.mojom
  enum UserDisplayMode {
    UNSPECIFIED = 0;
    BROWSER = 1;
    // MINIMAL_UI is never serialized.
    STANDALONE = 3;
    // FULLSCREEN is never serialized.
    // WINDOW_CONTROLS_OVERLAY is never serialized.
    TABBED = 6;
    // BORDERLESS is never serialized.
    // PICTURE_IN_PICTURE is never serialized.
  }

  optional string start_url = 1;
  optional string name = 2;

  // User-selected display setting, which may be used if no platform-specific
  // setting is available (eg. on Windows, Mac, and Linux). If absent,
  // user_display_mode_cros may be used as fallback (if populated). On pre-M122
  // devices this field is used by all platforms (ie. ChromeOS, Windows, Mac,
  // Linux) and always replaces any locally-stored value, with
  // absent/unspecified falling back to standalone.
  optional UserDisplayMode user_display_mode_default = 3;
  reserved "user_display_mode_non_cros";
  reserved "user_display_mode";

  optional uint32 theme_color = 4;
  optional string scope = 5;
  repeated WebAppIconInfo icon_infos = 6;

  // Used to store the page number that the app is displayed on in
  // chrome://apps.
  optional string user_page_ordinal = 7;
  // Used to store the in-page ranking for ordering apps in its given
  // `user_page_ordinal` page.
  optional string user_launch_ordinal = 8;

  // Used to store id specified in the manifest. This is a path that is relative
  // to the start_url, similar to how the id field is parsed in
  // https://www.w3.org/TR/appmanifest/#id-member, except this field does not
  // include a scheme or origin. This is only the path after the origin,
  // excluding the first "/".
  // Note: If this field is not set, then the manifest_id is generated using the
  // start_url in GenerateManifestIdFromStartUrlOnly. This is different than if
  // this is set to "", which means the manifest_id will be set to the origin of
  // the start_url.
  optional string relative_manifest_id = 9;

  // User-selected display setting for ChromeOS.
  // If absent, user_display_mode_default may be used as fallback (if
  // populated).
  // Introduced in M122.
  optional UserDisplayMode user_display_mode_cros = 10;
}