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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.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: win_initialized 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_win.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
index 0df2f44f2fba5566da941ef8d83299b048395a69..e14127ea49800c637f17e10a7e45207c673cf965 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc
@@ -474,7 +474,7 @@ OmniboxViewWin::OmniboxViewWin(OmniboxEditController* controller,
initiated_drag_(false),
drop_highlight_position_(-1),
ime_candidate_window_open_(false),
- background_color_(skia::SkColorToCOLORREF(LocationBarView::GetColor(
+ background_color_(skia::SkColorToCOLORREF(parent_view->GetColor(
ToolbarModel::NONE, LocationBarView::BACKGROUND))),
security_level_(ToolbarModel::NONE),
text_object_model_(NULL),
@@ -2369,7 +2369,7 @@ void OmniboxViewWin::EmphasizeURLComponents() {
// If we're going to emphasize parts of the text, then the baseline state
// should be "de-emphasized". If not, then everything should be rendered in
// the standard text color.
- cf.crTextColor = skia::SkColorToCOLORREF(LocationBarView::GetColor(
+ cf.crTextColor = skia::SkColorToCOLORREF(parent_view_->GetColor(
security_level_,
emphasize ? LocationBarView::DEEMPHASIZED_TEXT : LocationBarView::TEXT));
// NOTE: Don't use SetDefaultCharFormat() instead of the below; that sets the
@@ -2380,7 +2380,7 @@ void OmniboxViewWin::EmphasizeURLComponents() {
if (emphasize) {
// We've found a host name, give it more emphasis.
- cf.crTextColor = skia::SkColorToCOLORREF(LocationBarView::GetColor(
+ cf.crTextColor = skia::SkColorToCOLORREF(parent_view_->GetColor(
security_level_, LocationBarView::TEXT));
SetSelection(host.begin, host.end());
SetSelectionCharFormat(cf);
@@ -2394,7 +2394,7 @@ void OmniboxViewWin::EmphasizeURLComponents() {
insecure_scheme_component_.begin = scheme.begin;
insecure_scheme_component_.len = scheme.len;
}
- cf.crTextColor = skia::SkColorToCOLORREF(LocationBarView::GetColor(
+ cf.crTextColor = skia::SkColorToCOLORREF(parent_view_->GetColor(
security_level_, LocationBarView::SECURITY_TEXT));
SetSelection(scheme.begin, scheme.end());
SetSelectionCharFormat(cf);
@@ -2494,8 +2494,8 @@ void OmniboxViewWin::DrawSlashForInsecureScheme(HDC hdc,
sk_canvas->save();
if (selection_rect.isEmpty() ||
sk_canvas->clipRect(selection_rect, SkRegion::kDifference_Op)) {
- paint.setColor(LocationBarView::GetColor(security_level_,
- LocationBarView::SECURITY_TEXT));
+ paint.setColor(parent_view_->GetColor(security_level_,
+ LocationBarView::SECURITY_TEXT));
sk_canvas->drawLine(start_point.fX, start_point.fY,
end_point.fX, end_point.fY, paint);
}
@@ -2503,8 +2503,8 @@ void OmniboxViewWin::DrawSlashForInsecureScheme(HDC hdc,
// Draw the selected portion of the stroke.
if (!selection_rect.isEmpty() && sk_canvas->clipRect(selection_rect)) {
- paint.setColor(LocationBarView::GetColor(security_level_,
- LocationBarView::SELECTED_TEXT));
+ paint.setColor(parent_view_->GetColor(security_level_,
+ LocationBarView::SELECTED_TEXT));
sk_canvas->drawLine(start_point.fX, start_point.fY,
end_point.fX, end_point.fY, paint);
}

Powered by Google App Engine
This is Rietveld 408576698