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

Unified Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 1694333002: Remove HostDesktopType from c/b/ui/views/tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-27
Patch Set: rebase and linux Created 4 years, 10 months 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 | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 17d816d50c2869363fe61aa63a7753603a891c7e..fefb49f12cf63bfc60fa34d9e99fbf4b4cfa0fb1 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -61,16 +61,15 @@ TabRendererData::NetworkState TabContentsNetworkState(
return TabRendererData::NETWORK_STATE_LOADING;
}
-bool DetermineTabStripLayoutStacked(
- PrefService* prefs,
- chrome::HostDesktopType host_desktop_type,
- bool* adjust_layout) {
+bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {
*adjust_layout = false;
// For ash, always allow entering stacked mode.
- if (host_desktop_type != chrome::HOST_DESKTOP_TYPE_ASH)
- return false;
+#if defined(USE_ASH)
*adjust_layout = true;
return prefs->GetBoolean(prefs::kTabStripStackedLayout);
+#else
+ return false;
+#endif
}
// Get the MIME type of the file pointed to by the url, based on the file's
@@ -389,10 +388,8 @@ bool BrowserTabStripController::IsIncognito() {
void BrowserTabStripController::StackedLayoutMaybeChanged() {
bool adjust_layout = false;
- bool stacked_layout =
- DetermineTabStripLayoutStacked(g_browser_process->local_state(),
- browser_->host_desktop_type(),
- &adjust_layout);
+ bool stacked_layout = DetermineTabStripLayoutStacked(
+ g_browser_process->local_state(), &adjust_layout);
if (!adjust_layout || stacked_layout == tabstrip_->stacked_layout())
return;
@@ -562,10 +559,8 @@ void BrowserTabStripController::AddTab(WebContents* contents,
void BrowserTabStripController::UpdateStackedLayout() {
bool adjust_layout = false;
- bool stacked_layout =
- DetermineTabStripLayoutStacked(g_browser_process->local_state(),
- browser_->host_desktop_type(),
- &adjust_layout);
+ bool stacked_layout = DetermineTabStripLayoutStacked(
+ g_browser_process->local_state(), &adjust_layout);
tabstrip_->set_adjust_layout(adjust_layout);
tabstrip_->SetStackedLayout(stacked_layout);
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_drag_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698