commit | d73a15d924a402a58f33ce0cbacd8627732681a3 | [log] [tgz] |
---|---|---|
author | Alan Cutter <[email protected]> | Fri Aug 21 07:12:45 2020 |
committer | Commit Bot <[email protected]> | Fri Aug 21 07:12:45 2020 |
tree | 4dd96e2bb355554a62b7d761866db38b578eb0f9 | |
parent | adfe469e0e5cee4c7fef757842c4df265943ae45 [diff] [blame] |
Reland "Use document background color as active tab color for tabbed web apps" This is a reland of c4de5e43b76400725469e2ed0b14e0ebce333524 Fixed test flake due to not waiting for the first OnBackgroundColorChanged() event during page load. https://chromium-review.googlesource.com/c/chromium/src/+/2367584/2..3/chrome/browser/ui/views/web_apps/web_app_tab_strip_browsertest.cc Original change's description: > Use document background color as active tab color for tabbed web apps > > This CL hooks up the document's background color as the active tab > background color for experimental tabbed web app. > Tabbed web apps are hidden behind the DesktopPWAsTabStrip feature flag. > > This CL plumbs background color through from the renderer process along > the same route as document theme color. > > Before: https://bugs.chromium.org/p/chromium/issues/attachment?aid=460591&signed_aid=NcgKQaq5Y47QkcbQbbgNiw==&inline=1 > After: https://bugs.chromium.org/p/chromium/issues/attachment?aid=460590&signed_aid=RlnBzb7mQq1SIW1fGBY-oA==&inline=1 > > Bug: 1104083 > Change-Id: If1c3e2172f80375a1a4619c17ee52594ef813005 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2342426 > Commit-Queue: Alan Cutter <[email protected]> > Reviewed-by: Avi Drissman <[email protected]> > Reviewed-by: Dominick Ng <[email protected]> > Reviewed-by: Kentaro Hara <[email protected]> > Reviewed-by: Michael Wasserman <[email protected]> > Auto-Submit: Alan Cutter <[email protected]> > Cr-Commit-Position: refs/heads/master@{#800051} Bug: 1104083 Change-Id: If4a1b525af77ccd4697f6931b59a759a8bf3e3ed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367584 Commit-Queue: Dominick Ng <[email protected]> Auto-Submit: Alan Cutter <[email protected]> Reviewed-by: Dominick Ng <[email protected]> Reviewed-by: Kentaro Hara <[email protected]> Cr-Commit-Position: refs/heads/master@{#800486}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h index f1c25ed..bf5155b 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h
@@ -375,6 +375,10 @@ // theme-color meta tag if any. virtual base::Optional<SkColor> GetThemeColor() = 0; + // Returns the background color for the underlying content as set by CSS if + // any. + virtual base::Optional<SkColor> GetBackgroundColor() = 0; + // Returns the committed WebUI if one exists, otherwise the pending one. virtual WebUI* GetWebUI() = 0; virtual WebUI* GetCommittedWebUI() = 0;