DescriptionRemove Client= relationship in omnibox.mojom
omnibox.mojom defines the following interface for javascript to request
omnibox suggestions from C++ code:
interface OmniboxUIHandlerMojo {
StartOmniboxQuery(string input_string,
int32 cursor_position,
bool prevent_inline_autocomplete,
bool prefer_keyword,
int32 page_classification);
};
and the corresponding API for sending results back:
interface OmniboxPage {
HandleNewAutocompleteResult(OmniboxResultMojo result);
};
These were defined as clients of each other so they shared a message
pipe. However, there was no way for the caller of StartOmniboxQuery() to
correlate calls to HandleNewAutocompleteResult() with a particular
invocation of StartOmniboxQuery(). Additionally we're getting rid of the
Client= notion in mojom.
This changes the StartOmniboxQuery API to take an additional parameter
of type OmniboxPage corresponding to a new message pipe that can receive
requests. The caller in omnibox.js allocates a new pipe for each query
(closing the previous one) and gets replies on the new pipe.
(this is a potential use case of a multiple return value syntax in mojom
but that's just a proposal right now).
R=sky@chromium.org
BUG=451321
Committed: https://crrev.com/59ca1ee57ad1224e31a1449a6dc80796bd7b08f5
Cr-Commit-Position: refs/heads/master@{#314592}
Patch Set 1 #Patch Set 2 : #
Messages
Total messages: 6 (1 generated)
|