Commit 0dd6f263 authored by Kevin Bailey's avatar Kevin Bailey Committed by Commit Bot

[omnibox] Add 'has tab match' to debugging page

Within the chrome://omnibox results page, adds a column that shows
whether the match's URL matches an open tab, but only when 'Show
all details' is selected.

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I9ac6e0cecf2e95593c863f4c762ba189c470d917
Reviewed-on: https://chromium-review.googlesource.com/1055619
Commit-Queue: Kevin Bailey <krb@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558000}
parent e482c729
...@@ -80,7 +80,7 @@ function startOmniboxQuery(event) { ...@@ -80,7 +80,7 @@ function startOmniboxQuery(event) {
* @param {string} propertyName the name of the property in the autocomplete * @param {string} propertyName the name of the property in the autocomplete
* result record that we lookup. * result record that we lookup.
* @param {boolean} displayAlways whether the property should be displayed * @param {boolean} displayAlways whether the property should be displayed
* regardless of whether we're in detailed more. * regardless of whether we're in detailed mode.
* @param {string} tooltip a description of the property that will be * @param {string} tooltip a description of the property that will be
* presented as a tooltip when the mouse is hovered over the column title. * presented as a tooltip when the mouse is hovered over the column title.
* @constructor * @constructor
...@@ -122,6 +122,9 @@ var PROPERTY_OUTPUT_ORDER = [ ...@@ -122,6 +122,9 @@ var PROPERTY_OUTPUT_ORDER = [
new PresentationInfoRecord( new PresentationInfoRecord(
'Starred', '', 'starred', false, 'Starred', '', 'starred', false,
'A green checkmark indicates that the result has been bookmarked.'), 'A green checkmark indicates that the result has been bookmarked.'),
new PresentationInfoRecord(
'Has tab match', '', 'hasTabMatch', false,
'A green checkmark indicates that the result URL matches an open tab.'),
new PresentationInfoRecord( new PresentationInfoRecord(
'Description', '', 'description', false, 'The page title of the result.'), 'Description', '', 'description', false, 'The page title of the result.'),
new PresentationInfoRecord( new PresentationInfoRecord(
......
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
...@@ -25,6 +25,7 @@ struct AutocompleteMatch { ...@@ -25,6 +25,7 @@ struct AutocompleteMatch {
int32 transition; int32 transition;
bool allowed_to_be_default_match; bool allowed_to_be_default_match;
string type; string type;
bool has_tab_match;
string? associated_keyword; string? associated_keyword;
string keyword; string keyword;
bool starred; bool starred;
......
...@@ -81,6 +81,7 @@ struct TypeConverter<mojom::AutocompleteMatchPtr, AutocompleteMatch> { ...@@ -81,6 +81,7 @@ struct TypeConverter<mojom::AutocompleteMatchPtr, AutocompleteMatch> {
result->transition = input.transition; result->transition = input.transition;
result->allowed_to_be_default_match = input.allowed_to_be_default_match; result->allowed_to_be_default_match = input.allowed_to_be_default_match;
result->type = AutocompleteMatchType::ToString(input.type); result->type = AutocompleteMatchType::ToString(input.type);
result->has_tab_match = input.has_tab_match;
if (input.associated_keyword.get() != NULL) { if (input.associated_keyword.get() != NULL) {
result->associated_keyword = result->associated_keyword =
base::UTF16ToUTF8(input.associated_keyword->keyword); base::UTF16ToUTF8(input.associated_keyword->keyword);
......
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