Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1719)

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 1438513003: [MD] Implement incognito colors as a NativeTheme (for Aura). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: init param, pkasting feedback Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc ('k') | ui/gfx/color_palette.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 91adf437a15d0d2ba9ba80d9c40f30790048a06c..a3dd453009a154b843c3afbd1ffd7f067680d522 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -328,8 +328,8 @@ gfx::Size OmniboxViewViews::GetMinimumSize() const {
void OmniboxViewViews::OnNativeThemeChanged(const ui::NativeTheme* theme) {
views::Textfield::OnNativeThemeChanged(theme);
if (location_bar_view_) {
- SetBackgroundColor(location_bar_view_->GetColor(
- SecurityStateModel::NONE, LocationBarView::BACKGROUND));
+ SetBackgroundColor(
+ location_bar_view_->GetColor(LocationBarView::BACKGROUND));
}
EmphasizeURLComponents();
}
@@ -633,12 +633,10 @@ void OmniboxViewViews::EmphasizeURLComponents() {
base::UTF8ToUTF16(extensions::kExtensionScheme);
bool grey_base = text_is_url && (host.is_nonempty() || grey_out_url);
SetColor(location_bar_view_->GetColor(
- security_level_,
grey_base ? LocationBarView::DEEMPHASIZED_TEXT : LocationBarView::TEXT));
if (grey_base && !grey_out_url) {
- ApplyColor(
- location_bar_view_->GetColor(security_level_, LocationBarView::TEXT),
- gfx::Range(host.begin, host.end()));
+ ApplyColor(location_bar_view_->GetColor(LocationBarView::TEXT),
+ gfx::Range(host.begin, host.end()));
}
// Emphasize the scheme for security UI display purposes (if necessary).
@@ -649,8 +647,8 @@ void OmniboxViewViews::EmphasizeURLComponents() {
SetStyle(gfx::DIAGONAL_STRIKE, false);
if (!model()->user_input_in_progress() && text_is_url &&
scheme.is_nonempty() && (security_level_ != SecurityStateModel::NONE)) {
- SkColor security_color = location_bar_view_->GetColor(
- security_level_, LocationBarView::SECURITY_TEXT);
+ SkColor security_color =
+ location_bar_view_->GetSecureTextColor(security_level_);
const bool strike = (security_level_ == SecurityStateModel::SECURITY_ERROR);
const gfx::Range scheme_range(scheme.begin, scheme.end());
ApplyColor(security_color, scheme_range);
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc ('k') | ui/gfx/color_palette.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698