Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: chrome/browser/ui/browser.cc

Issue 8863011: Panels back behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/ui/panels/panel_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 6ce101e64e8d653bb5e14128ae6206c6093eb10f..652795d33ff4f21890c4415951238ec4a53160c4 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -475,8 +475,10 @@ Browser* Browser::CreateForApp(Type type,
RegisterAppPrefs(app_name, profile);
+#if !defined(OS_CHROMEOS) || defined(USE_AURA)
if (type == TYPE_PANEL &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisablePanels)) {
+ !PanelManager::ShouldUsePanels(
+ web_app::GetExtensionIdFromApplicationName(app_name))) {
type = TYPE_POPUP;
}
#if defined(TOOLKIT_GTK)
@@ -492,6 +494,7 @@ Browser* Browser::CreateForApp(Type type,
}
}
#endif // TOOLKIT_GTK
+#endif // !OS_CHROMEOS || USE_AURA
CreateParams params(type, profile);
params.app_name = app_name;
@@ -4287,8 +4290,6 @@ gfx::Rect Browser::GetInstantBounds() {
BrowserWindow* Browser::CreateBrowserWindow() {
#if !defined(OS_CHROMEOS) || defined(USE_AURA)
if (type_ == TYPE_PANEL) {
- DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisablePanels));
return PanelManager::GetInstance()->CreatePanel(this);
}
#endif
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | chrome/browser/ui/panels/panel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698