最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How does the Google Hangouts extension create the panel window? - Stack Overflow

programmeradmin3浏览0评论

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?

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?

Share Improve this question edited Aug 4, 2016 at 2:13 Dan Dascalescu 152k64 gold badges332 silver badges419 bronze badges asked Jul 23, 2012 at 14:25 TomTom 7949 silver badges19 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 19

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") ||
 ...
发布评论

评论列表(0)

  1. 暂无评论