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

Unified Diff: chrome/browser/ui/views/location_bar/selected_keyword_view.cc

Issue 1998493002: Update omnibox chips in MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review 2 Created 4 years, 7 months 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
Index: chrome/browser/ui/views/location_bar/selected_keyword_view.cc
diff --git a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
index fc03c1f925630c79519f2cac109c7cce1f15e568..b25f5090c379778997d7c3f154287d761f2a1ab6 100644
--- a/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
+++ b/chrome/browser/ui/views/location_bar/selected_keyword_view.cc
@@ -56,10 +56,8 @@ SkColor SelectedKeywordView::GetTextColor() const {
if (!ui::MaterialDesignController::IsModeMaterial())
return text_color_;
- return color_utils::IsDark(GetParentBackgroundColor())
- ? gfx::kGoogleBlue700
- : GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_LinkEnabled);
+ return GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_LinkEnabled);
}
SkColor SelectedKeywordView::GetBorderColor() const {
@@ -96,16 +94,19 @@ void SelectedKeywordView::SetKeyword(const base::string16& keyword) {
bool is_extension_keyword;
const base::string16 short_name =
model->GetKeywordShortName(keyword, &is_extension_keyword);
- const base::string16 full_name = is_extension_keyword ?
- short_name :
- l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT, short_name);
+ int keyword_text_ids = ui::MaterialDesignController::IsModeMaterial()
Peter Kasting 2016/05/20 20:54:11 Nit: "ids" here looks to me more like "IDs" than "
Evan Stade 2016/05/20 22:33:53 Done.
+ ? IDS_OMNIBOX_KEYWORD_TEXT_MD
+ : IDS_OMNIBOX_KEYWORD_TEXT;
+ const base::string16 full_name =
+ is_extension_keyword ? short_name : l10n_util::GetStringFUTF16(
+ keyword_text_ids, short_name);
full_label_.SetText(full_name);
const base::string16 min_string(
location_bar_util::CalculateMinString(short_name));
- const base::string16 partial_name = is_extension_keyword ?
- min_string :
- l10n_util::GetStringFUTF16(IDS_OMNIBOX_KEYWORD_TEXT, min_string);
+ const base::string16 partial_name =
+ is_extension_keyword ? min_string : l10n_util::GetStringFUTF16(
+ keyword_text_ids, min_string);
partial_label_.SetText(min_string.empty() ?
full_label_.text() : partial_name);
}

Powered by Google App Engine
This is Rietveld 408576698