-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[color] Simplify getting the ColorProviderManager::Key
Currently the construction of a ColorProviderKey by sources is a set of virtual methods overridden by the ColorProviderSource subclasses, or optional params set directly on the source (widget). This CL simplifies the current state and makes it such that ColorProviderSources are only required to override the GetColorProviderKey() method to configure the theme properties for their hosted UI. The specific changes required here are for Widget and BrowserFrame. Widget will always attempt to fetch the ColorProviderKey of its parent if it exists, otherwise falling back to the key constructed from the global NativeTheme instance. Color mode and elevation overrides can be set on the Widget itself so after it has fetched the key as described above these specific overrides are applied (if necessary). The BrowserFrame Widget subclass works similarly, first getting key as described above and applying the BrowserFrame-specific overrides. Follow up work will eliminate eliminate virtual from ColorProviderSource::GetColorProvider and have the method always take the key and get the ColorProvider from the manager. Bug: 1431202, 1455535 Change-Id: I703a954423d760195374447ae47d92a9e700e5c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4614129 Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com> Reviewed-by: Dana Fried <dfried@chromium.org> Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org> Reviewed-by: Sean Kau <skau@chromium.org> Cr-Commit-Position: refs/heads/main@{#1159135}
- Loading branch information
Thomas Lukaszewicz
authored and
Chromium LUCI CQ
committed
Jun 16, 2023
1 parent
83a5b61
commit db70d87
Showing
5 changed files
with
144 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters