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

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

Issue 11360144: Converts some of the omnibox related classes to support multiple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 a2b271d2ff585a596cdfe1a5d1e020df3056011d..b39b948b343353920186573c8c3126faa8fd70ef 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -241,7 +241,7 @@ void OmniboxViewViews::Init() {
textfield_->SetController(this);
textfield_->SetTextInputType(ui::TEXT_INPUT_TYPE_URL);
textfield_->SetBackgroundColor(LocationBarView::GetColor(
- ToolbarModel::NONE, LocationBarView::BACKGROUND));
+ GetNativeTheme(), ToolbarModel::NONE, LocationBarView::BACKGROUND));
if (popup_window_mode_)
textfield_->SetReadOnly(true);
@@ -859,14 +859,16 @@ void OmniboxViewViews::EmphasizeURLComponents() {
&scheme, &host);
const bool emphasize = model()->CurrentTextIsURL() && (host.len > 0);
+ const ui::NativeTheme* theme = GetNativeTheme();
Peter Kasting 2012/11/08 18:55:47 I'd remove either the blank above or the blank bel
+
SkColor base_color = LocationBarView::GetColor(
- security_level_,
+ theme, security_level_,
emphasize ? LocationBarView::DEEMPHASIZED_TEXT : LocationBarView::TEXT);
ApplyURLStyle(textfield_, 0, text.length(), base_color, false);
if (emphasize) {
- SkColor normal_color =
- LocationBarView::GetColor(security_level_, LocationBarView::TEXT);
+ SkColor normal_color = LocationBarView::GetColor(
+ theme, security_level_, LocationBarView::TEXT);
ApplyURLStyle(textfield_, host.begin, host.end(), normal_color, false);
}
@@ -878,7 +880,7 @@ void OmniboxViewViews::EmphasizeURLComponents() {
if (!model()->user_input_in_progress() && model()->CurrentTextIsURL() &&
scheme.is_nonempty() && (security_level_ != ToolbarModel::NONE)) {
SkColor security_color = LocationBarView::GetColor(
- security_level_, LocationBarView::SECURITY_TEXT);
+ theme, security_level_, LocationBarView::SECURITY_TEXT);
bool use_strikethrough = (security_level_ == ToolbarModel::SECURITY_ERROR);
ApplyURLStyle(textfield_, scheme.begin, scheme.end(),
security_color, use_strikethrough);

Powered by Google App Engine
This is Rietveld 408576698