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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 58873002: Adjusts panel ifdefs for aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: integrate feedback Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698