7

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?

Dan Dascalescu
  • 143,271
  • 52
  • 317
  • 404
Tom
  • 770
  • 9
  • 18

1 Answers1

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") ||
 ...
Rob W
  • 341,306
  • 83
  • 791
  • 678
  • 5
    @Tom Oh yes. It's the truth, whether you like it or not. – Rob W Jul 23 '12 at 15:50
  • 3
    This was not expected from Google. First they take up Chromium and now, whitelist their extension in source code – Rishi Dua Oct 20 '13 at 20:22
  • @RishiDua It's not the only whitelisted extension... Chromium has several powerful extension APIs that are private, undocumented and unavailable to regular extension developers. – Rob W Oct 20 '13 at 20:24
  • @RobW Thanks rob, That's a really nice find. Is there any info on when panels will be available to us non Google developers? I'd hate telling my users the'll need to download Chrome dev :/ (I couldn't get panels to work even after enabling the flag on the latest chrome version `35.0.1897.2 m`, only on the dev version.) – Segev Mar 21 '14 at 15:46
  • @Segev After enabling the flag, panels are also available on the stable channel. Have you restarted Chrome after enabling the flag? The flag will only become effective after you close all instances of Chrome. – Rob W Mar 21 '14 at 15:49
  • 1
    @RobW I thought I did...Now it works on the stable channel. Still, I don't think that's something that I'd ask from the end user to do (although there are a few extensions out there that explain how to enable that flag in their extension info) I wonder when \ ( if? ) it will be enabled by default. – Segev Mar 21 '14 at 15:55