Commit 7f879a59 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

Adding "Close all your windows" button all the time

The button to close all windows, which appears in the profile chooser 
menu, should be shown even when there is only one window open.
This addresses the comment crbug.com/130656#c49. 
More fixes are coming.

The MacOS version can be found here: crrev.com/c/725426.

Bug: 130656
Change-Id: I90b9c93c9a8452472b1d8dfc89fcf7084987a3a6
Reviewed-on: https://chromium-review.googlesource.com/720360
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510065}
parent 785e4a91
......@@ -1251,21 +1251,11 @@ views::View* ProfileChooserView::CreateOptionsView(bool display_lock,
layout->StartRow(1, 0);
layout->AddView(lock_button_);
} else if (!is_guest) {
int num_browsers = 0;
for (auto* browser : *BrowserList::GetInstance()) {
if (browser->profile()->GetOriginalProfile() ==
browser_->profile()->GetOriginalProfile())
num_browsers++;
}
if (num_browsers > 1) {
close_all_windows_button_ = new BackgroundColorHoverButton(
this,
l10n_util::GetStringUTF16(IDS_PROFILES_CLOSE_ALL_WINDOWS_BUTTON),
gfx::CreateVectorIcon(kCloseAllIcon, kIconSize,
gfx::kChromeIconGrey));
layout->StartRow(1, 0);
layout->AddView(close_all_windows_button_);
}
close_all_windows_button_ = new BackgroundColorHoverButton(
this, l10n_util::GetStringUTF16(IDS_PROFILES_CLOSE_ALL_WINDOWS_BUTTON),
gfx::CreateVectorIcon(kCloseAllIcon, kIconSize, gfx::kChromeIconGrey));
layout->StartRow(1, 0);
layout->AddView(close_all_windows_button_);
}
layout->StartRowWithPadding(1, 0, 0, vertical_spacing);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment