Opening two tabs in a single tab.

132 views
Skip to first unread message

Shivam Ranjan

unread,
Jul 8, 2021, 1:08:16 PM7/8/21
to Chromium-discuss

Hi Team,

Actually currently we are working on a project in which in single tab we need to show multiple devices with their individual devtools ,so here we were trying to duplicate the dev tool which is been opened in a single tab but we were unable to do so. Can you please tell is it possible to open two newtab instances in a single tab. So we can use devtool of each tab in a single tab only? I was working around AddNewTab() function so I can open two instances of tab in a single tab.

Any suggestions by which this can be done?

Thanks




Screenshot 2021-07-07 at 9.57.46 PM.png

Jon Perryman

unread,
Jul 9, 2021, 10:35:15 AM7/9/21
to Chromium-discuss
I suspect you want something different than what you are asking. You say you want tab grouping which exists in chromium. 

My suspicion is that you want some sort of relationship between the tabs. I'm guessing that you want devtools to communicate between each tab which for security reasons is not allowed.

Regards, Jon.

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Shivam Ranjan

unread,
Jul 13, 2021, 2:47:06 AM7/13/21
to Chromium-discuss, jon.pe...@gmail.com, Chromium-discuss
Hi,

Let me brief you about the same so you can get a wider picture.

Actually we are trying to open multiple devtools in a single tab. So we worked with two approaches.

1. We tried opening multiple devtools by in a single tab by using ExecInspectElement function. But somehow we were not able to open multiple devtools in a single tab.

2. The second approach we took was to open multiple tab instances in a single tab. So each tab instance would have its own devtool which will result in giving as multiple devtools in a single tab. Please check the below image once. 

So currently we are working on second approach where we are trying to open multiple tabs in a single tab. So if you can please let us know how tab grouping works then we would be able to group multiple tabs in a single tab which will solve our problem.

Thanks
Shivam.

Screenshot 2021-07-13 at 12.08.17 PM.png

Anurag Sharma

unread,
Jul 13, 2021, 3:50:18 AM7/13/21
to Chromium-discuss, jon.pe...@gmail.com, Chromium-discuss
@jon I think what the OP is asking is there a way to open multiple developer tools inside one tab just as shown in the attached image . And as normally tabs have one to one relationship with developer tools this could be achieved either by opening multiple tabs inside one tab and each tab maps to its individual developer tool.

Jon Perryman

unread,
Jul 13, 2021, 9:04:38 PM7/13/21
to Chromium-discuss
You are not telling us a very critical piece of information. What is the real problem you are trying to solve? I suspect it has to do with the Chromium interface to the Android debugger or with Chromium remote debugging. You believe that Chromium implementing tabs within tabs will solve that problem. I doubt it will solve your problem.

At the heart of each tab is an associated process with its own memory and resources. While tabs within tabs may sound simple, there are design implications that you need to consider and find alternate solutions. Ask yourself why the Chromium developers created tab groups instead of tabs within tabs.

So I ask you again, why do you need to have chromium remote debuggers implemented within a single tab? Does it have something to do with screencast? Does each remote debugger need it's own instance of Chromium? Is there something with focus change? Does it have something to do with identifying the tabs running a remote debugger? 

Regards, Jon. 

Jon Perryman

unread,
Jul 14, 2021, 2:00:51 PM7/14/21
to Chromium-discuss
I can't tell you much about tab groups because I only took a quick look at it several months ago. I wasn't impressed with the implementation although it has future possibilities. Tab groups will be your best bet to meet your request.

After a quick search, I found https://developer.chrome.com/docs/extensions/reference/tabGroups/. It appears that tabgroups is a Chome feature instead of being part of Chromium. Maybe you can ask the Chrome developers to make the feature available in Chromium. The API does not look robust enough to do what you want but if you are willing to invest the time, it will be your best chance for emulating tabs within a tab.  

I suspect that you probably won't like their choice for displaying the tab list because it's not pulldown but they chose a method that does fit well with Chromium's design. Their implementation appears to avoid many of the headaches that true tabs within a tab would encounter most especially with security and resource management. In the worst case, maybe they can give you some tips if they won't integrate tab groups into Chromium and allow you to extend the tabgroup api.

Good luck, Jon 

On Tue, Jul 13, 2021 at 11:55 PM MAYANK SHARMA <mayankvi...@gmail.com> wrote:
Like we create new tabs, is there any API or method where we can decide the tab grouping thing, where there will be multiple screens in a single tab with a different UserAgent set within them.

MAYANK SHARMA

unread,
Jul 14, 2021, 2:12:32 PM7/14/21
to Chromium-discuss, jon.pe...@gmail.com, Chromium-discuss
Like we create new tabs, is there any API or method where we can decide the tab grouping thing, where there will be multiple screens in a single tab with a different UserAgent set within them.

On Wednesday, July 14, 2021 at 6:34:38 AM UTC+5:30 jon.pe...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages