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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
// Copyright 2025 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;
option java_package = 'org.chromium.components.omnibox';
option java_outer_classname = 'SuggestTemplateInfoProto';
package omnibox;
import "answer_data.proto";
import "chrome_searchbox_stats.proto";
// Suggest Template rendering data.
// Next ID: 8
message SuggestTemplateInfo {
enum StandardSuggestStyle {
SUGGEST_STYLE_UNSPECIFIED = 0;
// Suggestions with query text only
DEFAULT = 1;
// Suggestions enriched with additional text or image data
ENRICHED = 2;
// Suggestion annotated with updated data.
ANNOTATED = 3;
}
// The style of the suggestion.
optional StandardSuggestStyle style = 1;
enum IconType {
// Unspecified.
ICON_TYPE_UNSPECIFIED = 0;
// History clock icon.
HISTORY = 1;
// Search loop icon.
SEARCH_LOOP = 2;
// Search loop with sparkle icon.
SEARCH_LOOP_WITH_SPARKLE = 3;
// Trending icon.
TRENDING = 4;
}
// The icon type of the suggestion, this is typically the icon in front of
// the primary text (i.e. query).
optional IconType type_icon = 2;
// The primary text of the suggestion (i.e. query).
optional FormattedString primary_text = 3;
// The secondary text of the suggestion (i.e. subtitle).
optional FormattedString secondary_text = 4;
message Image {
// The URL of the image.
optional string url = 1;
// Dominant color.
// Affects how image is rendered.
optional string dominant_color = 2;
// Image type.
optional ImageType type = 3;
enum ImageType {
TYPE_UNKNOWN = 0;
TYPE_LARGE = 1;
TYPE_SMALL = 2;
}
}
// This image is typically in front of the primary text (i.e. query) and
// replaces the suggestion icon.
optional Image image = 5;
// Additioanl request parameters for SRP fulfillment.
map<string, string> default_search_parameters = 6;
// Entity Suggestion Action descriptor.
message TemplateAction {
enum ActionType {
DIRECTIONS = 2;
CALL = 3;
REVIEWS = 20;
}
// The URI to open when the action is invoked.
// IMPORTANT: The `action_uri` must be used when non-empty and overrides
// the default navigation to the SRP.
optional string action_uri = 1;
// Action type for logging.
optional .omnibox.metrics.ActionInfo.ActionType logs_action_type = 2;
// Action type.
optional ActionType action_type = 3;
// If non-empty, the action must result in navigation to the SRP accompanied
// with these additional request parameters to help force a certain SRP.
map<string, string> search_parameters = 4;
// Display text for this action (primarily used for enhancements).
optional string display_text = 5;
// Query executed when this action or enhancement is selected. If non-empty,
// this query should be used instead of the parent suggestion's query.
optional string query = 6;
}
// List of possible actions for the suggestion.
repeated TemplateAction action_suggestions = 7;
}
|