Commit d6027822 authored by yzshen's avatar yzshen Committed by Commit bot

Switch some fields in omnibox.mojom to non-nullable.

BUG=406580
TEST=None

Review URL: https://codereview.chromium.org/501143003

Cr-Commit-Position: refs/heads/master@{#291777}
parent e2ea5183
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
// The structures here roughly mirror those from autocomplete. // The structures here roughly mirror those from autocomplete.
struct AutocompleteAdditionalInfo { struct AutocompleteAdditionalInfo {
string? key; string key;
string? value; string value;
}; };
struct AutocompleteMatchMojo { struct AutocompleteMatchMojo {
...@@ -15,40 +15,43 @@ struct AutocompleteMatchMojo { ...@@ -15,40 +15,43 @@ struct AutocompleteMatchMojo {
bool provider_done; bool provider_done;
int32 relevance; int32 relevance;
bool deletable; bool deletable;
string? fill_into_edit; string fill_into_edit;
string? inline_autocompletion; string inline_autocompletion;
string? destination_url; string destination_url;
string? contents; string contents;
string? description; string description;
int32 transition; int32 transition;
bool is_history_what_you_typed_match; bool is_history_what_you_typed_match;
bool allowed_to_be_default_match; bool allowed_to_be_default_match;
string? type; string type;
string? associated_keyword; string? associated_keyword;
string? keyword; string keyword;
bool starred; bool starred;
int32 duplicates; int32 duplicates;
bool from_previous; bool from_previous;
AutocompleteAdditionalInfo?[]? additional_info; AutocompleteAdditionalInfo[] additional_info;
}; };
struct AutocompleteResultsForProviderMojo { struct AutocompleteResultsForProviderMojo {
string? provider_name; string provider_name;
AutocompleteMatchMojo?[]? results; AutocompleteMatchMojo[] results;
}; };
struct OmniboxResultMojo { struct OmniboxResultMojo {
bool done; bool done;
// Time delta since the request was started, in milliseconds. // Time delta since the request was started, in milliseconds.
int32 time_since_omnibox_started_ms; int32 time_since_omnibox_started_ms;
string? host; string host;
bool is_typed_host; bool is_typed_host;
AutocompleteMatchMojo?[]? combined_results; AutocompleteMatchMojo[] combined_results;
AutocompleteResultsForProviderMojo?[]? results_by_provider; AutocompleteResultsForProviderMojo[] results_by_provider;
}; };
[Client=OmniboxPage] [Client=OmniboxPage]
interface OmniboxUIHandlerMojo { interface OmniboxUIHandlerMojo {
// TODO(yzshen): Conceptually |input_string| could be non-nullable. However,
// crbug.com/407258 (JavaScript encoder encodes empty string as null) prevents
// us from doing so. Change it into non-nullable once the bug is resolved.
StartOmniboxQuery(string? input_string, StartOmniboxQuery(string? input_string,
int32 cursor_position, int32 cursor_position,
bool prevent_inline_autocomplete, bool prevent_inline_autocomplete,
...@@ -57,5 +60,5 @@ interface OmniboxUIHandlerMojo { ...@@ -57,5 +60,5 @@ interface OmniboxUIHandlerMojo {
}; };
interface OmniboxPage { interface OmniboxPage {
HandleNewAutocompleteResult(OmniboxResultMojo? result); HandleNewAutocompleteResult(OmniboxResultMojo result);
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment