WebAppFrameToolbarView should respond directly to theme changes.
Specifically, the caption colors need to update. On Ash this was happening indirectly already, since BrowserNonClientFrameViewAsh::OnThemeChanged() was calling UpdateFrameColor(). But on other platforms, it was not. Handling this eliminates the need to set these colors at construction or in BrowserNonClientFrameViewAsh::Init(), since OnThemeChanged() will always be called when the frame is added to a widget, which happens after both those. This also eliminates the need to null-check the frame view in WebAppFrameToolbarView::UpdateCaptionColors(), since by OnThemeChanged() that will always be set. Finally, this eliminates the need for BrowserNonClientFrameViewAsh::OnThemeChanged() to indirectly call WebAppFrameToolbarView::UpdateCaptionColors(), since that is now called locally. Also, the BrowserNonClientFrameView need not explicitly SchedulePaint(), since if any children of the web app frame actually change color, they will invalidate themselves as necessary. Bug: none Change-Id: If0a24ccebcf8ce105dc3662ee6468d6b9b36d419 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1980166Reviewed-by:Alan Cutter <alancutter@chromium.org> Commit-Queue: Alan Cutter <alancutter@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#728425}
Showing
Please register or sign in to comment