[ToolbarMVC] Initialize theme color when ThemeColorProvider is first set
When lazily inflating the MenuButton, the call to setThemeColorProvider doesn't trigger an immediate update, risking starting with the wrong color/useLight combination if inflation occurs in a context where the defaults aren't correct, e.g. incognito. This CL corrects the issue by initializing the color immediately. The need for this code should, however, go away once the color is read from the model instead of directly, since the initial bind will take care of problems like this. Bug: 1127826 Change-Id: I609f42427a0b8fa877f4c165e97372d34047f28f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410590Reviewed-by:Matthew Jones <mdjones@chromium.org> Commit-Queue: Patrick Noland <pnoland@chromium.org> Cr-Commit-Position: refs/heads/master@{#807051}
Showing
Please register or sign in to comment