Commit e0351c62 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Use dark mode Omnibox in dark mode even if themed

Bug: 928311
Change-Id: I743e399fd34d23352c53069d382ac6a47d4b71b3
Reviewed-on: https://chromium-review.googlesource.com/c/1459997Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630148}
parent 18bd6536
...@@ -862,8 +862,8 @@ OmniboxPopupView* LocationBarView::GetOmniboxPopupView() { ...@@ -862,8 +862,8 @@ OmniboxPopupView* LocationBarView::GetOmniboxPopupView() {
OmniboxTint LocationBarView::GetTint() { OmniboxTint LocationBarView::GetTint() {
ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile()); ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile());
if (theme_service->UsingDefaultTheme()) {
bool is_dark_mode = GetNativeTheme()->SystemDarkModeEnabled(); bool is_dark_mode = GetNativeTheme()->SystemDarkModeEnabled();
if (theme_service->UsingDefaultTheme()) {
return profile()->GetProfileType() == Profile::INCOGNITO_PROFILE || return profile()->GetProfileType() == Profile::INCOGNITO_PROFILE ||
is_dark_mode is_dark_mode
? OmniboxTint::DARK ? OmniboxTint::DARK
...@@ -875,8 +875,7 @@ OmniboxTint LocationBarView::GetTint() { ...@@ -875,8 +875,7 @@ OmniboxTint LocationBarView::GetTint() {
theme_service->UsingSystemTheme()) theme_service->UsingSystemTheme())
return OmniboxTint::NATIVE; return OmniboxTint::NATIVE;
// TODO(tapted): Infer a tint from theme colors? return is_dark_mode ? OmniboxTint::DARK : OmniboxTint::LIGHT;
return OmniboxTint::LIGHT;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
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