Commit a7dfa55c authored by sky@chromium.org's avatar sky@chromium.org

Adjusts panel ifdefs for aura

I believe this gives us the behavior we're after.

BUG=289535
TEST=see bug
R=dimich@chromium.org, mpcomplete@chromium.org, stevenjb@chromium.org

Review URL: https://codereview.chromium.org/58873002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233402 0039d316-1c4b-4281-b951-d872f2087c98
parent d10feb57
...@@ -464,13 +464,12 @@ bool WindowsCreateFunction::RunImpl() { ...@@ -464,13 +464,12 @@ bool WindowsCreateFunction::RunImpl() {
#endif #endif
if (use_panels) { if (use_panels) {
create_panel = true; create_panel = true;
#if !defined(OS_CHROMEOS) // Non-ash supports both docked and detached panel types.
// Non-ChromeOS has both docked and detached panel types. if (chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH &&
if (create_data->type == create_data->type ==
windows::Create::Params::CreateData::TYPE_DETACHED_PANEL) { windows::Create::Params::CreateData::TYPE_DETACHED_PANEL) {
panel_create_mode = PanelManager::CREATE_AS_DETACHED; panel_create_mode = PanelManager::CREATE_AS_DETACHED;
} }
#endif
} else { } else {
window_type = Browser::TYPE_POPUP; window_type = Browser::TYPE_POPUP;
} }
...@@ -531,8 +530,8 @@ bool WindowsCreateFunction::RunImpl() { ...@@ -531,8 +530,8 @@ bool WindowsCreateFunction::RunImpl() {
if (urls.empty()) if (urls.empty())
urls.push_back(GURL(chrome::kChromeUINewTabURL)); urls.push_back(GURL(chrome::kChromeUINewTabURL));
#if defined(OS_CHROMEOS) #if defined(USE_ASH)
if (PanelManager::ShouldUsePanels(extension_id)) { if (chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) {
ShellWindow::CreateParams create_params; ShellWindow::CreateParams create_params;
create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL;
create_params.bounds = window_bounds; create_params.bounds = window_bounds;
...@@ -546,7 +545,7 @@ bool WindowsCreateFunction::RunImpl() { ...@@ -546,7 +545,7 @@ bool WindowsCreateFunction::RunImpl() {
CreateWindowValueWithTabs(GetExtension())); CreateWindowValueWithTabs(GetExtension()));
return true; return true;
} }
#else #endif
std::string title = std::string title =
web_app::GenerateApplicationNameFromExtensionId(extension_id); web_app::GenerateApplicationNameFromExtensionId(extension_id);
// Note: Panels ignore all but the first url provided. // Note: Panels ignore all but the first url provided.
...@@ -563,7 +562,6 @@ bool WindowsCreateFunction::RunImpl() { ...@@ -563,7 +562,6 @@ bool WindowsCreateFunction::RunImpl() {
panel->extension_window_controller()->CreateWindowValueWithTabs( panel->extension_window_controller()->CreateWindowValueWithTabs(
GetExtension())); GetExtension()));
return true; return true;
#endif
} }
// Create a new BrowserWindow. // Create a new BrowserWindow.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment