Avi Drissman | 0bd027db | 2022-10-04 17:11:47 | [diff] [blame] | 1 | // Copyright 2022 The Chromium Authors |
Moe Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | syntax = 'proto2'; |
| 6 | |
| 7 | option optimize_for = LITE_RUNTIME; |
| 8 | option java_package = 'org.chromium.components.omnibox'; |
| 9 | option java_outer_classname = 'GroupsProto'; |
| 10 | |
| 11 | package omnibox; |
| 12 | |
| 13 | // Suggestion group configurations supported by Chrome Omnibox. Contains |
| 14 | // information about how to display the suggestion groups. |
| 15 | message 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; |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 46 | |
| 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 Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 52 | } |
| 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). |
| 57 | message GroupsInfo { |
Tomasz Wiszkowski | abd96129c | 2022-09-24 00:15:00 | [diff] [blame] | 58 | map<uint32, GroupConfig> group_configs = 1; |
Moe Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | // Suggestion group IDs supported by Chrome Omnibox. These entries must not |
| 62 | // be removed or renumbered. |
| 63 | enum GroupId { |
| 64 | GROUP_INVALID = -1; |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 65 | |
Moe Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 66 | // 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 Ahmadi | a04786f5 | 2024-04-12 17:56:02 | [diff] [blame] | 74 | GROUP_MULTIMODAL = 10006; |
Nihar Majmudar | 86dbe52a | 2024-10-03 21:11:56 | [diff] [blame] | 75 | GROUP_CONTEXTUAL_SEARCH = 10007; |
Orin Jaworski | 840a702 | 2025-05-06 21:26:12 | [diff] [blame] | 76 | GROUP_CONTEXTUAL_SEARCH_ACTION = 10008; |
Moe Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 77 | GROUP_POLARIS_RESERVED_MAX = 19999; |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 78 | |
Tomasz Wiszkowski | 3535367 | 2023-10-11 16:41:00 | [diff] [blame] | 79 | // Mobile-specific auxiliary suggestions. |
Tomasz Wiszkowski | 570174a9 | 2022-09-29 00:56:54 | [diff] [blame] | 80 | GROUP_MOBILE_SEARCH_READY_OMNIBOX = 30000; |
| 81 | GROUP_MOBILE_MOST_VISITED = 30001; |
| 82 | GROUP_MOBILE_CLIPBOARD = 30002; |
Tomasz Wiszkowski | 3535367 | 2023-10-11 16:41:00 | [diff] [blame] | 83 | GROUP_MOBILE_QUERY_TILES = 30003; // E.g. "News", "Films", "Sports", ... |
Patrick Noland | 51039903 | 2024-03-11 16:57:27 | [diff] [blame] | 84 | GROUP_MOBILE_RICH_ANSWER = 30004; // Visually rich answer suggestion. |
Brandon Wylie | a7f260a | 2024-09-20 19:04:39 | [diff] [blame] | 85 | GROUP_MOBILE_OPEN_TABS = 30005; // Tabs which are currently open. |
Brandon Wylie | 653fa62 | 2024-10-10 00:03:09 | [diff] [blame] | 86 | GROUP_MOBILE_CROSS_DEVICE_TABS = 30006; // Tabs opened on another device. |
Brandon Wylie | 53603cd | 2024-11-07 02:16:19 | [diff] [blame] | 87 | GROUP_MOBILE_BOOKMARKS = 30007; |
| 88 | GROUP_MOBILE_HISTORY = 30008; |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 89 | |
Moe Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 90 | // Reserved for personalized zero-prefix suggestions. |
Moe Ahmadi | 3bde30a | 2022-10-13 22:35:37 | [diff] [blame] | 91 | // Produced by LocalHistoryZeroSuggestProvider and maybe ZeroSuggestProvider. |
Moe Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 92 | GROUP_PERSONALIZED_ZERO_SUGGEST = 40000; |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 93 | |
Moe Ahmadi | 98671352 | 2025-05-12 14:35:11 | [diff] [blame] | 94 | // 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 | |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 99 | // 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 Majmudar | 4fb97e1 | 2025-03-03 23:06:07 | [diff] [blame] | 106 | GROUP_MOST_VISITED = 50005; |
| 107 | GROUP_RECENTLY_CLOSED_TABS = 50006; |
Angela Yoeurng | 675bef1 | 2024-05-10 21:36:47 | [diff] [blame] | 108 | |
| 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 Majmudar | 42e3830f | 2025-01-16 21:28:32 | [diff] [blame] | 112 | |
| 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 Ahmadi | ab4f62a | 2022-09-17 06:01:22 | [diff] [blame] | 118 | } |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 119 | |
| 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. |
| 123 | enum 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 Wiszkowski | 6debb65 | 2022-10-08 01:59:47 | [diff] [blame] | 131 | // Search Ready Omnibox / Verbatim match |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 132 | SECTION_MOBILE_VERBATIM = 1; |
Tomasz Wiszkowski | 6debb65 | 2022-10-08 01:59:47 | [diff] [blame] | 133 | |
| 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 |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 141 | // SECTION_MOBILE_MOST_VISITED hosts a horizontal carousel with: |
| 142 | // - Most Visited Tiles |
| 143 | // - Organic Repeatable Queries |
Tomasz Wiszkowski | 6debb65 | 2022-10-08 01:59:47 | [diff] [blame] | 144 | SECTION_MOBILE_MOST_VISITED = 3; |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 145 | |
Moe Ahmadi | 7e48f5b | 2022-10-18 04:06:14 | [diff] [blame] | 146 | // 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 Ahmadi | 3bde30a | 2022-10-13 22:35:37 | [diff] [blame] | 149 | |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 150 | // 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 Ahmadi | 3bde30a | 2022-10-13 22:35:37 | [diff] [blame] | 154 | 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; |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 164 | |
Tomasz Wiszkowski | 3535367 | 2023-10-11 16:41:00 | [diff] [blame] | 165 | // Query tiles - a carousel with high-level query recommendations. |
| 166 | SECTION_MOBILE_QUERY_TILES = 15; |
Patrick Noland | 51039903 | 2024-03-11 16:57:27 | [diff] [blame] | 167 | // Visually rich answer suggestion presented as a standalone card. |
| 168 | SECTION_MOBILE_RICH_ANSWER = 16; |
Tomasz Wiszkowski | 3535367 | 2023-10-11 16:41:00 | [diff] [blame] | 169 | |
Angela Yoeurng | 675bef1 | 2024-05-10 21:36:47 | [diff] [blame] | 170 | // 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 | |
manukh | c0b737c | 2022-10-13 03:58:40 | [diff] [blame] | 174 | // 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 Majmudar | 4fb97e1 | 2025-03-03 23:06:07 | [diff] [blame] | 181 | SECTION_MOST_VISITED = 105; |
| 182 | SECTION_RECENTLY_CLOSED_TABS = 106; |
Brandon Wylie | 653fa62 | 2024-10-10 00:03:09 | [diff] [blame] | 183 | |
| 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 Wylie | 53603cd | 2024-11-07 02:16:19 | [diff] [blame] | 187 | SECTION_MOBILE_BOOKMARKS = 201; |
| 188 | SECTION_MOBILE_HISTORY = 202; |
Nihar Majmudar | 42e3830f | 2025-01-16 21:28:32 | [diff] [blame] | 189 | |
| 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; |
Ender | 0bf6a6e | 2022-10-05 23:20:35 | [diff] [blame] | 194 | } |