Commit 177c6d00 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

cros: Remove overview related header painting code from frame.

Overview now has a clipping animation which will clip out the
frame, so we can dont have to change how paint works for overview.
Caption buttons on the regular browser still need a repaint on
overview state changed.

Test: manual
Bug: 1014520

Change-Id: Ie2b1d2a28e11f50e52c1ebe50f0ce6a8a2f85412
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1863756Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706460}
parent ee54de2a
......@@ -667,11 +667,7 @@ bool BrowserNonClientFrameViewAsh::ShouldPaint() const {
if (immersive_mode_controller->IsEnabled())
return immersive_mode_controller->IsRevealed();
if (frame()->IsFullscreen())
return false;
// Do not paint for V1 apps in overview mode.
return browser_view()->IsBrowserTypeNormal() || !IsInOverviewMode();
return !frame()->IsFullscreen();
}
void BrowserNonClientFrameViewAsh::OnAddedToOrRemovedFromOverview() {
......@@ -679,14 +675,6 @@ void BrowserNonClientFrameViewAsh::OnAddedToOrRemovedFromOverview() {
caption_button_container_->SetVisible(should_show_caption_buttons);
if (web_app_frame_toolbar())
web_app_frame_toolbar()->SetVisible(should_show_caption_buttons);
// The entire frame should be repainted for v1 apps, since its visibility can
// change (see also ShouldPaint()). Do not invoke this on normal browser
// windows since it does not have to repaint frame except for the caption
// buttons and repainting might cause stuttering of the animation. See
// https://crbug.com/949227.
if (!browser_view()->IsBrowserTypeNormal())
SchedulePaint();
}
std::unique_ptr<ash::FrameHeader>
......
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