* Replace PlacesSearchAutocompleteProvider with UrlbarSearchUtils.
* Move the module from toolkit to browser. The only consumers of
PlacesSearchAutocompleteProvider are urlbar and UnifiedComplete.
* I'd like to add functions to UrlbarUtils instead, but
PlacesSearchAutocompleteProvider adds itself as an observer for search
engine changes, and it keeps some state so that alias lookups are O(1). It
has an init function to set that up. That's not quite as easy to do if I
just added some functions to UrlbarUtils, and I think that O(1) lookups of
aliases are worth keeping (vs. O(number of installed engines)), so I kept a
separate module, now called UrlbarSearchUtils.
* Init the search service (via UrlbarSearchUtils) from
UrlbarProvidersManager.startQuery so that every module involved in querying
doesn't need to do it.
* Remove PlacesSearchAutocompleteProvider.currentEngine. Previous consumers can
simply use Services.search directly now that the service is initialized early
(see previous point).
* Remove PlacesSearchAutocompleteProvider.parseSubmissionURL. Here again
consumers can use Services.search directly.
Differential Revision: https://phabricator.services.mozilla.com/D79244
Replace `isRestricting` with `getPriority` -- i.e., replace the binary restricting system with a general priority system. Instead of choosing restricting providers, the providers manager chooses the highest-priority providers.
Differential Revision: https://phabricator.services.mozilla.com/D60093
--HG--
extra : moz-landing-system : lando
Replace `isRestricting` with `getPriority` -- i.e., replace the binary restricting system with a general priority system. Instead of choosing restricting providers, the providers manager chooses the highest-priority providers.
Differential Revision: https://phabricator.services.mozilla.com/D60093
--HG--
extra : moz-landing-system : lando
This API is no longer needed, seeing as the Top Sites experiment is over. Dao suggested in bug 1605958 comment 1 that it be removed.
Differential Revision: https://phabricator.services.mozilla.com/D58375
--HG--
extra : moz-landing-system : lando
Rename acceptableSources to just sources, merge it with the existing sources property.
Differential Revision: https://phabricator.services.mozilla.com/D55082
--HG--
extra : moz-landing-system : lando
Adds a `browser.urlbar.onEngagement` event. Listeners are passed the current engagement state: start, engagement, abandonment, or discard. The extension could use this to record its own parallel telemetry (scalars, event telemetry, etc.) per engagement.
Differential Revision: https://phabricator.services.mozilla.com/D53897
--HG--
extra : moz-landing-system : lando
Split the SEARCH source into SEARCH_NETWORK or SEARCH_LOCAL to distinguish
search results coming from a remote source, from those generated locally.
browser.urlbar.suggest.searches will only affect SEARCH_NETWORK results.
Differential Revision: https://phabricator.services.mozilla.com/D49172
--HG--
extra : moz-landing-system : lando
Add "tip" to the ResultType enum and UrlbarProviderExtension.RESULT_TYPES, corresponding to the new TIP type. Update the existing test.
Differential Revision: https://phabricator.services.mozilla.com/D46248
--HG--
extra : moz-landing-system : lando
`UrlbarResult` objects for search results have a `payload.engine` property, the name of the engine, but extensions won't always know the name Firefox uses internally or even any name at all. For example, the top sites API returns search results with aliases but not names. We should let extensions specify engine URLs and aliases, and we can use them to look up the engine name.
The UrlbarResult.jsm change is unrelated but fixes a minor annoyance I found while working on the top-sites extension. My background script returns results with `isKeywordOffer: true`, but that causes an error in `UrlbarResult.payloadAndSimpleHighlights` because it converts string values to arrays and then expects non-string values to be arrays. Instead, it should be converting non-array values to arrays.
Differential Revision: https://phabricator.services.mozilla.com/D39800
--HG--
extra : moz-landing-system : lando
This provides a set of promises that the searchservice resolves once the search engine has been configured
Differential Revision: https://phabricator.services.mozilla.com/D33660
--HG--
extra : moz-landing-system : lando
This provides a set of promises that the searchservice resolves once the search engine has been configured
Differential Revision: https://phabricator.services.mozilla.com/D33660
--HG--
extra : moz-landing-system : lando
This provides a set of promises that the searchservice resolves once the search engine has been configured
Differential Revision: https://phabricator.services.mozilla.com/D33660
--HG--
extra : moz-landing-system : lando
* Rename the browser.urlbar.onQueryReady event onBehaviorRequested to make its purpose and return value clear.
* Add a browser.urlbar.onResultsRequested event that's fired when a query starts so that providers can add results. Listeners should return an array of Result objects. Add the Result type. It has a `payload` property that can be an arbitrary object depending on the result type.
* Add a browser.urlbar.onQueryCanceled event that's fired when a query is canceled.
* Rename the QueryContext type to just Query. From an extension's point of view, there's no difference between Query and QueryContext like there is for the internal implementation, so "Context" is unnecessary imo.
* Internally, remove the extension listeners map from UrlbarProvidersManager. Instead, extension listeners are added directly to UrlbarProviderExtension instances, and then UrlbarProvidersManager just loops through extension providers, not a separate map of listeners.
* Since UrlbarProviderExtension is getting a little bigger, move it to its own file.
* Fix a bug in UrlbarMuxerUnifiedComplete where the heuristic result sometimes does not come first in the sorted results, depending on the timing of when results from UrlbarProviderUnifiedComplete and other providers are added.
* Move SkippableTimer to UrlbarUtils.jsm, add a logger property, and add a name property so that it's easy to figure out which timers time out.
* Add lots of tests.
Differential Revision: https://phabricator.services.mozilla.com/D34809
--HG--
extra : moz-landing-system : lando
This implements the first part of the new urlbar API to be used by many future
mozilla-signed experiments. This part sets the foundation for the "urlbar"
permission and API, and introduces a first API to register an extension provider.
Further API calls will be added in dependencies of Bug 1547279, and in particular
Bug 1547666 will add a way for these extension providers to return results for
the urlbar.
Differential Revision: https://phabricator.services.mozilla.com/D32332
--HG--
extra : moz-landing-system : lando