blob: 203541ff14d7db0c32ca620452b5b77bfbcf6519 [file] [log] [blame]
// Copyright 2018 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";
import "web_app_specifics.proto";
option optimize_for = LITE_RUNTIME;
package web_app;
// Local data: Information about web app icon.
message WebAppIconInfoProto {
// The size of the square app icon, in raw pixels.
required int32 size_in_px = 1;
// The URL of the app icon.
optional string url = 2;
}
// A set to track simultaneous installs and uninstalls from multiple install
// sources.
message SourcesProto {
required bool system = 1;
required bool policy = 2;
required bool web_app_store = 3;
required bool sync = 4;
required bool default = 5;
}
// Full WebApp object data. See detailed comments in
// chrome/browser/web_applications/web_app.h. Note on database identities:
// app_id is a hash of launch_url. app_id is the client tag for sync system.
// app_id is the storage key in ModelTypeStore.
message WebAppProto {
// Synced data. It is replicated across all devices with WEB_APPS.
//
// |sync_data.name| and |sync_data.theme_color| are read by a device to
// generate a placeholder icon. Any device may write new values to synced
// |name| and |theme_color|. A random last update wins.
required sync_pb.WebAppSpecifics sync_data = 1;
// This enum should be synced with
// third_party/blink/public/mojom/manifest/display_mode.mojom
enum DisplayMode {
// UNDEFINED if optional |display_mode| is absent.
BROWSER = 1;
MINIMAL_UI = 2;
STANDALONE = 3;
FULLSCREEN = 4;
}
// Local data. May vary across devices. Not to be synced.
//
required string name = 2;
optional uint32 theme_color = 3;
optional string description = 4;
optional DisplayMode display_mode = 5;
optional string scope = 6;
required SourcesProto sources = 7;
required bool is_locally_installed = 8;
optional bool is_in_sync_install = 9;
// A list of icon infos.
repeated WebAppIconInfoProto icon_infos = 10;
// A list of icon sizes we successfully downloaded to store on disk.
repeated int32 downloaded_icon_sizes = 11;
}