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..9f41aa46235cbcfd67d78bf73013e4498d2cc8f1 100644 |
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc |
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc |
| @@ -204,7 +204,7 @@ Browser* CreateBrowserWindow(const Browser::CreateParams& params, |
| const std::string& extension_id) { |
| bool use_existing_browser_window = false; |
| -#if defined(OS_WIN) |
| +#if defined(OS_WIN) && !defined(USE_AURA) |
|
Dmitry Titov
2013/11/05 05:53:07
IsSingleWindowMetroMode() returns false if USE_ASH
sky
2013/11/05 15:49:37
You are right. I was trying to make it clear this
|
| // In windows 8 metro mode we don't allow windows to be created. |
| if (win8::IsSingleWindowMetroMode()) |
| use_existing_browser_window = true; |
| @@ -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,9 @@ bool WindowsCreateFunction::RunImpl() { |
| if (urls.empty()) |
| urls.push_back(GURL(chrome::kChromeUINewTabURL)); |
| -#if defined(OS_CHROMEOS) |
| - if (PanelManager::ShouldUsePanels(extension_id)) { |
| +#if defined(USE_ASH) |
| + if (PanelManager::ShouldUsePanels(extension_id) && |
| + chrome::GetActiveDesktop() == chrome::HOST_DESKTOP_TYPE_ASH) { |
|
Dmitry Titov
2013/11/05 05:53:07
There should be an else branch that creates a pane
sky
2013/11/05 15:49:37
I think you're saying nuke the ifdef here. Done. G
|
| ShellWindow::CreateParams create_params; |
| create_params.window_type = ShellWindow::WINDOW_TYPE_V1_PANEL; |
| create_params.bounds = window_bounds; |
| @@ -647,7 +647,7 @@ bool WindowsUpdateFunction::RunImpl() { |
| &controller)) |
| return false; |
| -#if defined(OS_WIN) |
| +#if defined(OS_WIN) && !defined(USE_AURA) |
| // Silently ignore changes on the window for metro mode. |
| if (win8::IsSingleWindowMetroMode()) { |
| SetResult(controller->CreateWindowValue()); |
| @@ -775,7 +775,7 @@ bool WindowsRemoveFunction::RunImpl() { |
| &controller)) |
| return false; |
| -#if defined(OS_WIN) |
| +#if defined(OS_WIN) && !defined(USE_AURA) |
| // In Windows 8 metro mode, an existing Browser instance is reused for |
| // hosting the extension tab. We should not be closing it as we don't own it. |
| if (win8::IsSingleWindowMetroMode()) |