Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the Google Hangouts extension create the panel window?

The Doc says if you want to create a panel window ,you should use

chrome.windows.create({...,type:"panel"}, function callback)

At the same time, it says "Specifies what type of browser window to create. The 'panel' type creates a popup unless the '--enable-panels' flag is set."

So you should go to "chrome://flags" to change it manually. But Google Hangouts can create the panel without doing that. How does it do that?

like image 791
Tom Avatar asked Jul 23 '12 14:07

Tom


1 Answers

The Google Hangouts extension (formerly called "Chat for Google") is explicitly whitelisted in the source code, which allows it to use the panel feature even when --enable-panels flag is unset:

bool PanelManager::ShouldUsePanels(const std::string& extension_id) {
 ...
    return CommandLine::ForCurrentProcess()->HasSwitch(
        switches::kEnablePanels) ||
        extension_id == std::string("nckgahadagoaajjgafhacjanaoiihapd") ||
 ...
like image 180
Rob W Avatar answered Oct 04 '22 05:10

Rob W