Closed Bug 1348686 Opened 3 years ago Closed 3 years ago

Implement ability to change a tab's tab type


(Firefox for Android :: General, enhancement, P2)






(Reporter: JanH, Unassigned)


(Blocks 1 open bug)



(1 file)

Should we go with the approach from bug 1346004, we probably also want some facility to move a tab into a different group. We also need to trigger appropriate notifications, so e.g. the tabs tray can handle a tab changing it's type to/from a browsing-type tab.
Blocks: 1337341
Blocks: 1351739
Blocks: 1285858
Assignee: nobody → cnevinchen
Comment on attachment 8853347 [details]
Bug 1348686 - WIP , just a begining of the type change process

::: mobile/android/base/java/org/mozilla/gecko/
(Diff revision 1)
> +    public void setType(TabType type) {
> +        if (mType != type) {
> +            mType = type;
> +            final GeckoBundle data = new GeckoBundle(1);
> +            data.putInt("id", mId);
> +            // TODO: 3/31/17 Not sure what to send here. If it's Tab:Load then we should make the data

No need to shoehorn this into an existing message type if nothing suitable is available. Just look at the [the amount of work browser.js does for Tab:Load]( Your doubts are correct - you don't want to trigger all this just for changing the type.
Just create a new message type (Tab:TypeChanged, or whatever sounds good) and handle that in browser.js to do what is necessary (updating the type on the tab object and notifying the session store). Tab:Selected is a good example of how this can look like.
Priority: -- → P2
Blocks: 1352999
Blocks: 1356188
Not blocking standalone mode, this is more relevant for customtabs afaik
No longer blocks: 1285858
I don't think we really need this for the first release of custom tabs, but we should look into it later.
Sorry I'm fully booked by other tasks. Anyone who is interested in this please take it. Or I'll come back when my current project ends.
Assignee: cnevinchen → nobody
No longer applicable with the switch to Geckoview-based custom tabs and web apps.
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.