blob: 85f94203d2aebda8cb00f7dcd058590d0c56d856 [file] [log] [blame]
Avi Drissman0bd027db2022-10-04 17:11:471// Copyright 2022 The Chromium Authors
Moe Ahmadiab4f62a2022-09-17 06:01:222// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = 'proto2';
6
7option optimize_for = LITE_RUNTIME;
8option java_package = 'org.chromium.components.omnibox';
9option java_outer_classname = 'GroupsProto';
10
11package omnibox;
12
13// Suggestion group configurations supported by Chrome Omnibox. Contains
14// information about how to display the suggestion groups.
15message GroupConfig {
16 // The optional header text the group must appear under.
17 optional string header_text = 1;
18
19 enum SideType {
20 DEFAULT_PRIMARY = 0;
21 SECONDARY = 1;
22 }
23
24 // Indicates the primary or secondary column of suggestions.
25 optional SideType side_type = 2;
26
27 enum RenderType {
28 DEFAULT_VERTICAL = 0;
29 HORIZONTAL = 1;
30 GRID = 2;
31 }
32
33 // Indicates how the group will be rendered.
34 optional RenderType render_type = 3;
35
36 enum Visibility {
37 DEFAULT_VISIBLE = 0;
38 HIDDEN = 1;
39 }
40
41 // Indicates whether the group is initially hidden (collapsed).
42 optional Visibility visibility = 4;
43
44 // Indicates the reason why this suggestion shows up.
45 optional uint32 why_this_result_reason = 5;
Ender0bf6a6e2022-10-05 23:20:3546
47 // The section of the list where the group belongs.
48 // This field is set by Chrome and should not be populated in GWS.
49 optional GroupSection section = 6;
50
51 // Next ID: 7
Moe Ahmadiab4f62a2022-09-17 06:01:2252}
53
54// Contains information about the suggestion groups supported by Chrome Omnibox.
55// Specifically the mapping from suggestion group IDs (GroupId) to suggestion
56// group configurations (GroupConfig).
57message GroupsInfo {
Tomasz Wiszkowskiabd96129c2022-09-24 00:15:0058 map<uint32, GroupConfig> group_configs = 1;
Moe Ahmadiab4f62a2022-09-17 06:01:2259}
60
61// Suggestion group IDs supported by Chrome Omnibox. These entries must not
62// be removed or renumbered.
63enum GroupId {
64 GROUP_INVALID = -1;
manukhc0b737c2022-10-13 03:58:4065
Moe Ahmadiab4f62a2022-09-17 06:01:2266 // Reserved for Polaris zero-prefix suggestions.
67 // Produced by ZeroSuggestProvider.
68 GROUP_PREVIOUS_SEARCH_RELATED = 10000;
69 GROUP_PREVIOUS_SEARCH_RELATED_ENTITY_CHIPS = 10001;
70 GROUP_TRENDS = 10002;
71 GROUP_TRENDS_ENTITY_CHIPS = 10003;
72 GROUP_RELATED_QUERIES = 10004;
73 GROUP_VISITED_DOC_RELATED = 10005;
Moe Ahmadia04786f52024-04-12 17:56:0274 GROUP_MULTIMODAL = 10006;
Nihar Majmudar86dbe52a2024-10-03 21:11:5675 GROUP_CONTEXTUAL_SEARCH = 10007;
Orin Jaworski840a7022025-05-06 21:26:1276 GROUP_CONTEXTUAL_SEARCH_ACTION = 10008;
Moe Ahmadiab4f62a2022-09-17 06:01:2277 GROUP_POLARIS_RESERVED_MAX = 19999;
manukhc0b737c2022-10-13 03:58:4078
Tomasz Wiszkowski35353672023-10-11 16:41:0079 // Mobile-specific auxiliary suggestions.
Tomasz Wiszkowski570174a92022-09-29 00:56:5480 GROUP_MOBILE_SEARCH_READY_OMNIBOX = 30000;
81 GROUP_MOBILE_MOST_VISITED = 30001;
82 GROUP_MOBILE_CLIPBOARD = 30002;
Tomasz Wiszkowski35353672023-10-11 16:41:0083 GROUP_MOBILE_QUERY_TILES = 30003; // E.g. "News", "Films", "Sports", ...
Patrick Noland510399032024-03-11 16:57:2784 GROUP_MOBILE_RICH_ANSWER = 30004; // Visually rich answer suggestion.
Brandon Wyliea7f260a2024-09-20 19:04:3985 GROUP_MOBILE_OPEN_TABS = 30005; // Tabs which are currently open.
Brandon Wylie653fa622024-10-10 00:03:0986 GROUP_MOBILE_CROSS_DEVICE_TABS = 30006; // Tabs opened on another device.
Brandon Wylie53603cd2024-11-07 02:16:1987 GROUP_MOBILE_BOOKMARKS = 30007;
88 GROUP_MOBILE_HISTORY = 30008;
manukhc0b737c2022-10-13 03:58:4089
Moe Ahmadiab4f62a2022-09-17 06:01:2290 // Reserved for personalized zero-prefix suggestions.
Moe Ahmadi3bde30a2022-10-13 22:35:3791 // Produced by LocalHistoryZeroSuggestProvider and maybe ZeroSuggestProvider.
Moe Ahmadiab4f62a2022-09-17 06:01:2292 GROUP_PERSONALIZED_ZERO_SUGGEST = 40000;
manukhc0b737c2022-10-13 03:58:4093
Moe Ahmadi986713522025-05-12 14:35:1194 // Reserved for MIA zero-prefix suggestions and personalized zero-prefix
95 // suggestions with MIA.
96 GROUP_MIA_RECOMMENDATIONS = 45000;
97 GROUP_PERSONALIZED_ZERO_SUGGEST_WITH_MIA = 45001;
98
manukhc0b737c2022-10-13 03:58:4099 // Cross platform suggestions with vanilla visual representation (i.e.
100 // vertical, primary column, and no header), but useful for sorting.
101 GROUP_STARTER_PACK = 50000;
102 GROUP_SEARCH = 50001;
103 GROUP_OTHER_NAVS = 50002; // E.g., bookmarks, history, etc.
104 GROUP_DOCUMENT = 50003; // E.g., Drive docs, slides, sheets, etc.
105 GROUP_HISTORY_CLUSTER = 50004;
Nihar Majmudar4fb97e12025-03-03 23:06:07106 GROUP_MOST_VISITED = 50005;
107 GROUP_RECENTLY_CLOSED_TABS = 50006;
Angela Yoeurng675bef12024-05-10 21:36:47108
109 // IPH suggestions that appear in zero-prefix. These suggestions are
110 // informational only and do not trigger a search or navigation.
111 GROUP_ZERO_SUGGEST_IN_PRODUCT_HELP = 60000;
Nihar Majmudar42e3830f2025-01-16 21:28:32112
113 // Extension suggestions that appear in non-zps input. These suggestions
114 // appear when ExperimentalOmniboxLabs is enabled. Every extension should
115 // have a unique group in order to have its own header.
116 GROUP_UNSCOPED_EXTENSION_1 = 70000;
117 GROUP_UNSCOPED_EXTENSION_2 = 70001;
Moe Ahmadiab4f62a2022-09-17 06:01:22118}
Ender0bf6a6e2022-10-05 23:20:35119
120// Suggestion group sections determine the order in which suggestion groups
121// appear in the result list relative to one another. A group with a section of
122// a lower numeric value comes before a group with a section of a higher value.
123enum GroupSection {
124 // The default section. Any group with this section is placed above all other
125 // groups. Must not be removed or renumbered and must have the lowest value.
126 SECTION_DEFAULT = 0;
127
128 // Mobile-specific auxiliary suggestions. These suggestions are sourced on
129 // device, and appear above any other content.
130 // SECTION_MOBILE_VERBATIM hosts:
Tomasz Wiszkowski6debb652022-10-08 01:59:47131 // Search Ready Omnibox / Verbatim match
Ender0bf6a6e2022-10-05 23:20:35132 SECTION_MOBILE_VERBATIM = 1;
Tomasz Wiszkowski6debb652022-10-08 01:59:47133
134 // SECTION_MOBILE_CLIPBOARD hosts:
135 // - Text you copied
136 // - Link you copied
137 // - Image you copied
138 SECTION_MOBILE_CLIPBOARD = 2;
139
140 // Clipboard suggestions
Ender0bf6a6e2022-10-05 23:20:35141 // SECTION_MOBILE_MOST_VISITED hosts a horizontal carousel with:
142 // - Most Visited Tiles
143 // - Organic Repeatable Queries
Tomasz Wiszkowski6debb652022-10-08 01:59:47144 SECTION_MOBILE_MOST_VISITED = 3;
Ender0bf6a6e2022-10-05 23:20:35145
Moe Ahmadi7e48f5b2022-10-18 04:06:14146 // historical zero-prefix suggestions. May be overwritten by the dynamically
147 // assigned section for GROUP_PERSONALIZED_ZERO_SUGGEST if reported by server.
148 SECTION_PERSONALIZED_ZERO_SUGGEST = 4;
Moe Ahmadi3bde30a2022-10-13 22:35:37149
Ender0bf6a6e2022-10-05 23:20:35150 // A contiguous range reserved for remote zero-prefix suggestions.
151 // The sections are dynamically assigned to the groups found in the server
152 // response based on the order in which they appear in the results.
153 // Accommodates up to 10 distinct suggestion groups in the server response.
Moe Ahmadi3bde30a2022-10-13 22:35:37154 SECTION_REMOTE_ZPS_1 = 5;
155 SECTION_REMOTE_ZPS_2 = 6;
156 SECTION_REMOTE_ZPS_3 = 7;
157 SECTION_REMOTE_ZPS_4 = 8;
158 SECTION_REMOTE_ZPS_5 = 9;
159 SECTION_REMOTE_ZPS_6 = 10;
160 SECTION_REMOTE_ZPS_7 = 11;
161 SECTION_REMOTE_ZPS_8 = 12;
162 SECTION_REMOTE_ZPS_9 = 13;
163 SECTION_REMOTE_ZPS_10 = 14;
manukhc0b737c2022-10-13 03:58:40164
Tomasz Wiszkowski35353672023-10-11 16:41:00165 // Query tiles - a carousel with high-level query recommendations.
166 SECTION_MOBILE_QUERY_TILES = 15;
Patrick Noland510399032024-03-11 16:57:27167 // Visually rich answer suggestion presented as a standalone card.
168 SECTION_MOBILE_RICH_ANSWER = 16;
Tomasz Wiszkowski35353672023-10-11 16:41:00169
Angela Yoeurng675bef12024-05-10 21:36:47170 // IPH suggestions that appear in zero-prefix. These suggestions are
171 // informational only and do not trigger a search or navigation.
172 SECTION_ZERO_SUGGEST_IN_PRODUCT_HELP = 17;
173
manukhc0b737c2022-10-13 03:58:40174 // Cross platform suggestions with vanilla visual representation (i.e.
175 // vertical, primary column, and no header), but useful for sorting.
176 SECTION_STARTER_PACK = 100;
177 SECTION_SEARCH = 101;
178 SECTION_OTHER_NAVS = 102;
179 SECTION_DOCUMENT = 103;
180 SECTION_HISTORY_CLUSTER = 104;
Nihar Majmudar4fb97e12025-03-03 23:06:07181 SECTION_MOST_VISITED = 105;
182 SECTION_RECENTLY_CLOSED_TABS = 106;
Brandon Wylie653fa622024-10-10 00:03:09183
184 // Android-specific auxiliary suggestions. These suggestions are sourced on
185 // device, and appear above any other content.
186 SECTION_MOBILE_OPEN_TABS = 200;
Brandon Wylie53603cd2024-11-07 02:16:19187 SECTION_MOBILE_BOOKMARKS = 201;
188 SECTION_MOBILE_HISTORY = 202;
Nihar Majmudar42e3830f2025-01-16 21:28:32189
190 // Unscoped extension suggestions. These suggestions are sourced from
191 // extensions for non zps input when ExperimentalOmniboxLabs is enabled.
192 SECTION_UNSCOPED_EXTENSION_1 = 300;
193 SECTION_UNSCOPED_EXTENSION_2 = 301;
Ender0bf6a6e2022-10-05 23:20:35194}