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
|
// Copyright 2022 The Chromium Authors
// 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.proto.os_state;
// Store size and timestamp of an icon so that changes can be easily detected.
message ShortcutIconData {
optional int32 icon_size = 1;
optional int64 timestamp = 2;
}
message ShortcutDescription {
optional string title = 1;
optional string description = 2;
repeated ShortcutIconData icon_data_any = 3;
}
message ProtocolsHandled {
message Protocol {
optional string protocol = 1;
optional string url = 2;
}
repeated Protocol protocols = 1;
}
message RunOnOsLogin {
enum Mode {
MODE_UNSPECIFIED = 0;
MODE_NOT_RUN = 1;
MODE_WINDOWED = 2;
MODE_MINIMIZED = 3;
}
optional Mode run_on_os_login_mode = 1;
}
message ShortcutMenuInfo {
optional string shortcut_name = 1;
optional string shortcut_launch_url = 2;
repeated ShortcutIconData icon_data_any = 3;
repeated ShortcutIconData icon_data_maskable = 4;
repeated ShortcutIconData icon_data_monochrome = 5;
}
message ShortcutMenus {
repeated ShortcutMenuInfo shortcut_menu_info = 1;
}
message OsUninstallRegistration {
optional bool registered_with_os = 1;
optional string display_name = 2;
}
message FileHandling {
// A mapping between a MIME type and a set of file extensions for a file
// handler "accept" entry. See chrome/browser/web_applications/web_app.h for
// details.
message FileHandler {
message FileHandlerAccept {
optional string mimetype = 1;
repeated string file_extensions = 2;
}
optional string action = 1;
repeated FileHandlerAccept accept = 2;
optional string display_name = 3;
}
repeated FileHandler file_handlers = 1;
}
// Represents all OS integration. This is intended to be the 'final' OS
// integration state, after any logic that would filter/modify/disable any of
// the features. When stored in the database, this represents the expected OS
// integration state for this app.
message WebAppOsIntegration {
reserved 2, 8;
optional ShortcutDescription shortcut = 1;
optional ProtocolsHandled protocols_handled = 3;
optional RunOnOsLogin run_on_os_login = 4;
optional OsUninstallRegistration uninstall_registration = 5;
optional ShortcutMenus shortcut_menus = 6;
optional FileHandling file_handling = 7;
// Add data states for other OS integration hooks here.
// New fields added to this message must also be added to:
// OsStatesDebugValue() and GenerateRandomWebAppOsIntegration().
}
|