Chromium Code Reviews| 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 // The structures here roughly mirror those from autocomplete. | 5 // The structures here roughly mirror those from autocomplete. |
| 6 | 6 |
| 7 struct AutocompleteAdditionalInfo { | 7 struct AutocompleteAdditionalInfo { |
| 8 string? key; | 8 string key; |
| 9 string? value; | 9 string value; |
| 10 }; | 10 }; |
| 11 | 11 |
| 12 struct AutocompleteMatchMojo { | 12 struct AutocompleteMatchMojo { |
| 13 string? provider_name; | 13 string? provider_name; |
| 14 // Only meaningful if |provider_name| is valid. | 14 // Only meaningful if |provider_name| is valid. |
| 15 bool provider_done; | 15 bool provider_done; |
| 16 int32 relevance; | 16 int32 relevance; |
| 17 bool deletable; | 17 bool deletable; |
| 18 string? fill_into_edit; | 18 string fill_into_edit; |
| 19 string? inline_autocompletion; | 19 string inline_autocompletion; |
| 20 string? destination_url; | 20 string destination_url; |
| 21 string? contents; | 21 string contents; |
| 22 string? description; | 22 string description; |
| 23 int32 transition; | 23 int32 transition; |
| 24 bool is_history_what_you_typed_match; | 24 bool is_history_what_you_typed_match; |
| 25 bool allowed_to_be_default_match; | 25 bool allowed_to_be_default_match; |
| 26 string? type; | 26 string type; |
| 27 string? associated_keyword; | 27 string? associated_keyword; |
| 28 string? keyword; | 28 string keyword; |
| 29 bool starred; | 29 bool starred; |
| 30 int32 duplicates; | 30 int32 duplicates; |
| 31 bool from_previous; | 31 bool from_previous; |
| 32 AutocompleteAdditionalInfo?[]? additional_info; | 32 AutocompleteAdditionalInfo[] additional_info; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 struct AutocompleteResultsForProviderMojo { | 35 struct AutocompleteResultsForProviderMojo { |
| 36 string? provider_name; | 36 string provider_name; |
| 37 AutocompleteMatchMojo?[]? results; | 37 AutocompleteMatchMojo[] results; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 struct OmniboxResultMojo { | 40 struct OmniboxResultMojo { |
| 41 bool done; | 41 bool done; |
| 42 // Time delta since the request was started, in milliseconds. | 42 // Time delta since the request was started, in milliseconds. |
| 43 int32 time_since_omnibox_started_ms; | 43 int32 time_since_omnibox_started_ms; |
| 44 string? host; | 44 string host; |
| 45 bool is_typed_host; | 45 bool is_typed_host; |
| 46 AutocompleteMatchMojo?[]? combined_results; | 46 AutocompleteMatchMojo[] combined_results; |
| 47 AutocompleteResultsForProviderMojo?[]? results_by_provider; | 47 AutocompleteResultsForProviderMojo[] results_by_provider; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 [Client=OmniboxPage] | 50 [Client=OmniboxPage] |
| 51 interface OmniboxUIHandlerMojo { | 51 interface OmniboxUIHandlerMojo { |
| 52 // TODO(yzshen): Conceptually |input_string| could be non-nullable. However, | |
|
yzshen1
2014/08/25 20:25:32
I have reported this bug to the author.
I am fine
| |
| 53 // crbug.com/407258 (JavaScript encoder encodes empty string as null) prevents | |
| 54 // us from doing so. Change it into non-nullable once the bug is resolved. | |
| 52 StartOmniboxQuery(string? input_string, | 55 StartOmniboxQuery(string? input_string, |
| 53 int32 cursor_position, | 56 int32 cursor_position, |
| 54 bool prevent_inline_autocomplete, | 57 bool prevent_inline_autocomplete, |
| 55 bool prefer_keyword, | 58 bool prefer_keyword, |
| 56 int32 page_classification); | 59 int32 page_classification); |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 interface OmniboxPage { | 62 interface OmniboxPage { |
| 60 HandleNewAutocompleteResult(OmniboxResultMojo? result); | 63 HandleNewAutocompleteResult(OmniboxResultMojo result); |
| 61 }; | 64 }; |
| OLD | NEW |