Commit 405e68b0 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Use standard frame for Apps that support tabs

Apps with tabs require the extra height (42px vs 35px) in order
for the tabs to display correctly.  Also changed apps with tabs
to use default color scheme for tabs rather than having only a
single color across the entire frame so that fg vs bg tabs
are easily detected.

Bug: 1015624
Change-Id: I22a08ee24910ad2c3c6cd40680410be5fc7a7643
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1868209Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707686}
parent 0a269f27
...@@ -150,9 +150,11 @@ SkColor BrowserNonClientFrameView::GetFrameColor( ...@@ -150,9 +150,11 @@ SkColor BrowserNonClientFrameView::GetFrameColor(
if (frame_->ShouldUseTheme()) if (frame_->ShouldUseTheme())
return GetThemeProviderForProfile()->GetColor(color_id); return GetThemeProviderForProfile()->GetColor(color_id);
// Use app theme color if it is set, but not for apps with tabs.
web_app::AppBrowserController* app_controller = web_app::AppBrowserController* app_controller =
browser_view_->browser()->app_controller(); browser_view_->browser()->app_controller();
if (app_controller && app_controller->GetThemeColor()) if (app_controller && app_controller->GetThemeColor() &&
!app_controller->HasTabStrip())
return *app_controller->GetThemeColor(); return *app_controller->GetThemeColor();
return ThemeProperties::GetDefaultColor(color_id, return ThemeProperties::GetDefaultColor(color_id,
......
...@@ -84,9 +84,12 @@ bool IsV1AppBackButtonEnabled() { ...@@ -84,9 +84,12 @@ bool IsV1AppBackButtonEnabled() {
// Returns true if the header should be painted so that it looks the same as // Returns true if the header should be painted so that it looks the same as
// the header used for packaged apps. // the header used for packaged apps.
bool UsePackagedAppHeaderStyle(const Browser* browser) { bool UsePackagedAppHeaderStyle(const Browser* browser) {
// Use for non tabbed trusted source windows, e.g. Settings, as well as apps. if (browser->is_type_normal() ||
return (!browser->is_type_normal() && browser->is_trusted_source()) || (browser->is_type_popup() && !browser->is_trusted_source())) {
browser->deprecated_is_app(); return false;
}
return !browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP);
} }
} // namespace } // namespace
......
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