12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- // Copyright 2022 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.
- // If you change or add any fields in this file, update proto_visitors.h and
- // potentially 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 protocol datatype extension for saved tab groups. Saved Tab Groups are
- // tab groups which can be recalled between browser sessions, and if sync is
- // turned on, cross device. A saved tab group contains tabs which are stored as
- // a SavedTabGroupSpecifics separately (SavedTabGroupTab). This is due to
- // limitations from the sync service on the size of an individual sync entity.
- message SavedTabGroup {
- // These colors map to tab_groups::TabGroupColorId. They DO NOT match the enum
- // integer values due to "kGrey" being in the "Unspecified" field.
- enum SavedTabGroupColor {
- SAVED_TAB_GROUP_COLOR_UNSPECIFIED = 0;
- SAVED_TAB_GROUP_COLOR_GREY = 1;
- SAVED_TAB_GROUP_COLOR_BLUE = 2;
- SAVED_TAB_GROUP_COLOR_RED = 3;
- SAVED_TAB_GROUP_COLOR_YELLOW = 4;
- SAVED_TAB_GROUP_COLOR_GREEN = 5;
- SAVED_TAB_GROUP_COLOR_PINK = 6;
- SAVED_TAB_GROUP_COLOR_PURPLE = 7;
- SAVED_TAB_GROUP_COLOR_CYAN = 8;
- SAVED_TAB_GROUP_COLOR_ORANGE = 9;
- }
- // The position of the SavedTabGroup in any visual display. This also
- // represents the index in the SavedTabGroupModel of the group.
- optional int64 position = 1;
- // The displayed title of the group, shown on the tab group and the saved tab
- // group button.
- optional string title = 2;
- // The color of the group, mapped to tab_groups::TabGroupColorId.
- optional SavedTabGroupColor color = 3;
- }
- // Sync protocol datatype extension for saved tab group tabs. SavedTabGroupTab
- // are the sync representation of a tab in a saved tab group. they are stored as
- // separate entities due to size limitations of sync entities.
- message SavedTabGroupTab {
- // An id that links the saved tab group tab to it's saved tab group.
- optional string group_guid = 1;
- // The position in the Tab Strip the tab is located relative to the start of
- // the tab group. This is also the index in the saved_tabs_ vector in the
- // SavedTabGroup in the SavedTabGroupModel, which is updated by the
- // TabStripModel.
- optional int64 position = 2;
- // Tab Data used for constructing the tab.
- optional string url = 3;
- }
- message SavedTabGroupSpecifics {
- // An id that refers to the sync saved tab group object.
- optional string guid = 1;
- // Timestamps for CRUD operations.
- optional int64 creation_time_windows_epoch_micros = 2;
- optional int64 update_time_windows_epoch_micros = 3;
- oneof entity {
- SavedTabGroup group = 4;
- SavedTabGroupTab tab = 5;
- }
- }
|