diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-06 22:43:38 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-06 22:43:38 +0000 |
commit | a7dfa55c79ac9a8635f7126c3c51de33c5c5a951 (patch) | |
tree | 30c329d514b007b5bf7d39f556beb6d4d3ec20fe /chrome/browser/extensions | |
parent | d10feb57d771dd668ff7c2029314fec7053d8866 (diff) | |
download | chromium_src-a7dfa55c79ac9a8635f7126c3c51de33c5c5a951.zip chromium_src-a7dfa55c79ac9a8635f7126c3c51de33c5c5a951.tar.gz chromium_src-a7dfa55c79ac9a8635f7126c3c51de33c5c5a951.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r-- | chrome/browser/extensions/api/tabs/tabs_api.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc index 3a9c99c..94a04c5 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 defined(USE_ASH) + if (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,7 @@ bool WindowsCreateFunction::RunImpl() { CreateWindowValueWithTabs(GetExtension())); return true; } -#else +#endif std::string title = web_app::GenerateApplicationNameFromExtensionId(extension_id); // Note: Panels ignore all but the first url provided. @@ -563,7 +562,6 @@ bool WindowsCreateFunction::RunImpl() { panel->extension_window_controller()->CreateWindowValueWithTabs( GetExtension())); return true; -#endif } // Create a new BrowserWindow. |