Add option to list/switch to open tabs in gnome shell search provider
Categories
(Firefox :: Shell Integration, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox132 | --- | fixed |
People
(Reporter: ed.bowler, Assigned: msirringhaus)
References
Details
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
Enter the Gnome Shell overview and type the name of an open tab.
Actual results:
The Firefox search provider lists entries from it's browsing history, and when one is selected opens a new tab.
Expected results:
I would like the Firefox search provider to list open tabs and switch to that tab when I select an entry.
Comment 1•6 years ago
|
||
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
Hi,
I will move this enhancement over to a component so developers can take a look over it. If this is not the correct component please feel free to change it to an appropriate one.
Thanks for the suggestion.
Updated•6 years ago
|
Comment 2•6 years ago
|
||
That involves changes in search mechanism at:
https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/browser/components/shell/nsGNOMEShellSearchProvider.cpp#185
Marco, is there a way how to search opened tabs and switch to them like URL bar does?
Thanks.
Comment 3•6 years ago
|
||
UrlbarProviderOpenTabs.jsm manages a temp table that is part of the urlbar database connection, it provides a startQuery method that we don't use currently, but could likely be used to query open tabs with a few changes.
Actually, long term you could also just reuse the urlbar model, building an appropriate queryContext and using UrlbarProvidersManager, you could pretty much reproduce the urlbar results where you wish. If we fix 1628016, then you should just create your own manager and query through it...
Unfortunately, all of that is nice for js consumers, but not much for cpp consumers, for which you would have to add some xpcom wrappers.
Comment 4•6 years ago
|
||
Of course, you could also add your tracking in UrlbarProviderOpenTabs.registerOpenTab and unregisterOpenTab and create your own cache through some xpidl, but it would certainly take up additional memory, so it should be done only when the feature is used.
If you went with adding your own tracking to UrlbarProviderOpenTabs.registerOpenTab and unregisterOpenTab would that mean that when you turn on the option you'd need to build the cache by running a query using the first suggested method, right? Otherwise the cache would only contain tabs opened after the option was enabled. Unless I'm misunderstanding something (which is totally possible, I'm not in anyway familiar with the code), or this is acceptable behaviour ;)
Comment 6•6 years ago
|
||
Well, register/unregister happen regardless in the browser, what I meant is mostly that if the additional tracking is only used on Gnome and maybe even just for certain versions, of if a certain Gnome feature is installed, then you should keep a cache only in those cases (not for Mac/Windows or other cases on Linux). That's something you should be able to detect on first call and decide whether to activate your cache or not. It's a memory VS feature decision to take.
I'd like to see this built in as well, would certainly be useful in some situations.
Updated•3 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 9•2 years ago
|
||
I'd be interested to work on this. Marco, is your outline about how it could be implemented still valid? Or is there some better way to do this, these days?
Comment 10•2 years ago
|
||
The code is pretty much in the same shape. Whether to reuse the existing sqlite temp table, or create a new cpp store (and add/remove through calls from registerOpenTab and unregisterOpenTab) is what should be figured out, I don't know the specifics for the shell side.
I imagine one would create an XPCOM component exposing an api to search, and then use let conn = await lazy.PlacesUtils.promiseLargeCacheDBConnection(); to query the moz_openpages_temp table directly.
| Assignee | ||
Comment 11•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
| bugherder | ||
Description
•