| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Stores information about an omnibox interaction. | 5 // Stores information about an omnibox interaction. |
| 6 | 6 |
| 7 syntax = "proto2"; | 7 syntax = "proto2"; |
| 8 | 8 |
| 9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 // The new tab page in which this omnibox interaction first started | 120 // The new tab page in which this omnibox interaction first started |
| 121 // with the user having focus in the fakebox. | 121 // with the user having focus in the fakebox. |
| 122 INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8; | 122 INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8; |
| 123 | 123 |
| 124 // The user is on a search result page that's not doing search term | 124 // The user is on a search result page that's not doing search term |
| 125 // replacement, meaning the URL of the page should've appeared in the | 125 // replacement, meaning the URL of the page should've appeared in the |
| 126 // omnibox before the user started editing it, not the search terms. | 126 // omnibox before the user started editing it, not the search terms. |
| 127 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9; | 127 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9; |
| 128 | 128 |
| 129 // The user is on the home screen. |
| 130 APP_HOME = 10; |
| 131 |
| 132 // The user is in the search app. |
| 133 APP_SEARCH = 11; |
| 134 |
| 135 // The user is in the maps app. |
| 136 APP_MAPS = 12; |
| 137 |
| 129 // When adding new classifications, please consider adding them in | 138 // When adding new classifications, please consider adding them in |
| 130 // chrome/browser/resources/omnibox/omnibox.html | 139 // chrome/browser/resources/omnibox/omnibox.html |
| 131 // so that these new options are displayed on about:omnibox. | 140 // so that these new options are displayed on about:omnibox. |
| 132 } | 141 } |
| 133 optional PageClassification current_page_classification = 10; | 142 optional PageClassification current_page_classification = 10; |
| 134 | 143 |
| 135 optional OmniboxInputType.Type input_type = 8; | 144 optional OmniboxInputType.Type input_type = 8; |
| 136 | 145 |
| 137 // An enum used in multiple places below. | 146 // An enum used in multiple places below. |
| 138 enum ProviderType { | 147 enum ProviderType { |
| 139 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here) | 148 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here) |
| 140 HISTORY_URL = 1; // URLs in history, or user-typed URLs | 149 HISTORY_URL = 1; // URLs in history, or user-typed URLs |
| 141 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history | 150 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history |
| 142 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages | 151 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages |
| 143 // in history | 152 // in history |
| 144 SEARCH = 4; // Search suggestions for the default search engine | 153 SEARCH = 4; // Search suggestions for the default search engine |
| 145 KEYWORD = 5; // Keyword-triggered searches | 154 KEYWORD = 5; // Keyword-triggered searches |
| 146 BUILTIN = 6; // Built-in URLs, such as chrome://version | 155 BUILTIN = 6; // Built-in URLs, such as chrome://version |
| 147 SHORTCUTS = 7; // Recently selected omnibox suggestions | 156 SHORTCUTS = 7; // Recently selected omnibox suggestions |
| 148 EXTENSION_APPS = 8; // DEPRECATED. Suggestions from extensions or apps | 157 EXTENSION_APPS = 8; // DEPRECATED. Suggestions from extensions or apps |
| 149 CONTACT = 9; // DEPRECATED. The user's contacts | 158 CONTACT = 9; // DEPRECATED. The user's contacts |
| 150 BOOKMARK = 10; // The user's bookmarks | 159 BOOKMARK = 10; // The user's bookmarks |
| 151 ZERO_SUGGEST = 11; // Suggestions based on the current page | 160 ZERO_SUGGEST = 11; // Suggestions based on the current page |
| 152 // This enum value is currently only used by Android GSA. It represents | 161 // This enum value is currently only used by Android GSA. It represents |
| 153 // a suggestion from the phone. | 162 // a suggestion from the phone. |
| 154 ON_DEVICE = 12; | 163 ON_DEVICE = 12; |
| 155 } | 164 } |
| 156 | 165 |
| 157 // The result set displayed on the completion popup | 166 // The result set displayed on the completion popup |
| 158 // Next tag: 6 | 167 // Next tag: 7 |
| 159 message Suggestion { | 168 message Suggestion { |
| 160 // Where does this result come from? | 169 // Where does this result come from? |
| 161 optional ProviderType provider = 1; | 170 optional ProviderType provider = 1; |
| 162 | 171 |
| 163 // What kind of result this is. | 172 // What kind of result this is. |
| 164 // This corresponds to the AutocompleteMatch::Type enumeration in | 173 // This corresponds to the AutocompleteMatch::Type enumeration in |
| 165 // chrome/browser/autocomplete/autocomplete_match.h (except for Android | 174 // chrome/browser/autocomplete/autocomplete_match.h (except for Android |
| 166 // GSA result types). | 175 // GSA result types). |
| 167 enum ResultType { | 176 enum ResultType { |
| 168 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here) | 177 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 optional int32 relevance = 3; | 222 optional int32 relevance = 3; |
| 214 | 223 |
| 215 // How many times this result was typed in / selected from the omnibox. | 224 // How many times this result was typed in / selected from the omnibox. |
| 216 // Only set for some providers and result_types. At the time of | 225 // Only set for some providers and result_types. At the time of |
| 217 // writing this comment, it is only set for HistoryURL and | 226 // writing this comment, it is only set for HistoryURL and |
| 218 // HistoryQuickProvider matches. | 227 // HistoryQuickProvider matches. |
| 219 optional int32 typed_count = 5; | 228 optional int32 typed_count = 5; |
| 220 | 229 |
| 221 // Whether this item is starred (bookmarked) or not. | 230 // Whether this item is starred (bookmarked) or not. |
| 222 optional bool is_starred = 4; | 231 optional bool is_starred = 4; |
| 232 |
| 233 // Whether this item is disabled in the UI (not clickable). |
| 234 optional bool is_disabled = 6; |
| 223 } | 235 } |
| 224 repeated Suggestion suggestion = 9; | 236 repeated Suggestion suggestion = 9; |
| 225 | 237 |
| 226 // A data structure that holds per-provider information, general information | 238 // A data structure that holds per-provider information, general information |
| 227 // not associated with a particular result. | 239 // not associated with a particular result. |
| 228 // Next tag: 6 | 240 // Next tag: 6 |
| 229 message ProviderInfo { | 241 message ProviderInfo { |
| 230 // Which provider generated this ProviderInfo entry. | 242 // Which provider generated this ProviderInfo entry. |
| 231 optional ProviderType provider = 1; | 243 optional ProviderType provider = 1; |
| 232 | 244 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 254 // The number of times this provider returned a non-zero number of | 266 // The number of times this provider returned a non-zero number of |
| 255 // suggestions during this omnibox session. | 267 // suggestions during this omnibox session. |
| 256 // Note that each provider may define a session differently for its | 268 // Note that each provider may define a session differently for its |
| 257 // purposes. | 269 // purposes. |
| 258 optional int32 times_returned_results_in_session = 5; | 270 optional int32 times_returned_results_in_session = 5; |
| 259 } | 271 } |
| 260 // A list of diagnostic information about each provider. Providers | 272 // A list of diagnostic information about each provider. Providers |
| 261 // will appear at most once in this list. | 273 // will appear at most once in this list. |
| 262 repeated ProviderInfo provider_info = 12; | 274 repeated ProviderInfo provider_info = 12; |
| 263 } | 275 } |
| OLD | NEW |