Chromium Code Reviews| Index: chrome/browser/extensions/api/tabs/tabs_api.cc |
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc |
| index c4ba43b1470424f0a205dc72f038019dbf13c6a7..540ce4b4db9a6a920bbc7cdbd4f260fc0b320bd1 100644 |
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc |
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc |
| @@ -464,13 +464,12 @@ bool WindowsCreateFunction::RunImpl() { |
| #endif |
| if (use_panels) { |
| create_panel = true; |
| -#if !defined(OS_CHROMEOS) |
| - // Non-ChromeOS has both docked and detached panel types. |
| - if (create_data->type == |
| + // Non-ash supports both docked and detached panel types. |
| + if (chrome::GetActiveDesktop() != chrome::HOST_DESKTOP_TYPE_ASH && |
| + create_data->type == |
| windows::Create::Params::CreateData::TYPE_DETACHED_PANEL) { |
| panel_create_mode = PanelManager::CREATE_AS_DETACHED; |
| } |
| -#endif |
| } else { |
| window_type = Browser::TYPE_POPUP; |
| } |
| @@ -531,8 +530,8 @@ bool WindowsCreateFunction::RunImpl() { |
| if (urls.empty()) |
| urls.push_back(GURL(chrome::kChromeUINewTabURL)); |
| -#if defined(OS_CHROMEOS) |
| - if (PanelManager::ShouldUsePanels(extension_id)) { |
| + if (PanelManager::ShouldUsePanels(extension_id) && |
|
Dmitry Titov
2013/11/05 17:47:19
This check for ShouldUsePanels can be removed sinc
sky
2013/11/05 18:07:54
Done.
|
| + chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { |
| ShellWindow::CreateParams create_params; |
| create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; |
| create_params.bounds = window_bounds; |
| @@ -546,7 +545,6 @@ bool WindowsCreateFunction::RunImpl() { |
| CreateWindowValueWithTabs(GetExtension())); |
| return true; |
| } |
| -#else |
| std::string title = |
| web_app::GenerateApplicationNameFromExtensionId(extension_id); |
| // Note: Panels ignore all but the first url provided. |
| @@ -563,7 +561,6 @@ bool WindowsCreateFunction::RunImpl() { |
| panel->extension_window_controller()->CreateWindowValueWithTabs( |
| GetExtension())); |
| return true; |
| -#endif |
| } |
| // Create a new BrowserWindow. |