Index: chrome/browser/ui/panels/panel_manager.cc |
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc |
index ef8a026c3a26626f638c9d19e6d7ae0494d61509..06edbb9d9932c807637ddbdbf7666b2e5b84896f 100644 |
--- a/chrome/browser/ui/panels/panel_manager.cc |
+++ b/chrome/browser/ui/panels/panel_manager.cc |
@@ -105,6 +105,11 @@ void PanelManager::SetDisplaySettingsProviderForTesting( |
// static |
bool PanelManager::ShouldUsePanels(const std::string& extension_id) { |
+ // If --disable-panels is on, never use panels. |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kDisablePanels)) |
+ return false; |
+ |
// If --enable-panels is on, always use panels. |
if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnablePanels)) |