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

Unified Diff: chrome/browser/ui/views/location_bar/keyword_hint_view.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/location_bar/keyword_hint_view.cc
diff --git a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
index 06b47c5b20c6cff5c26c9972114c34cdf4508d66..e47fb981717d766af2d4b1cbb8d0150a6a87e003 100644
--- a/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
+++ b/chrome/browser/ui/views/location_bar/keyword_hint_view.cc
@@ -27,9 +27,11 @@ static const int kTabImageYOffset = 1;
// The tab key image.
static const gfx::ImageSkia* kTabButtonImage = NULL;
-KeywordHintView::KeywordHintView(Profile* profile) : profile_(profile) {
- leading_label_ = CreateLabel();
- trailing_label_ = CreateLabel();
+KeywordHintView::KeywordHintView(Profile* profile,
+ const LocationBarView* location_bar_view)
+ : profile_(profile) {
+ leading_label_ = CreateLabel(location_bar_view);
+ trailing_label_ = CreateLabel(location_bar_view);
if (!kTabButtonImage) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
@@ -129,11 +131,12 @@ void KeywordHintView::Layout() {
}
}
-views::Label* KeywordHintView::CreateLabel() {
+views::Label* KeywordHintView::CreateLabel(
+ const LocationBarView* location_bar_view) {
views::Label* label = new views::Label();
- label->SetBackgroundColor(LocationBarView::GetColor(
+ label->SetBackgroundColor(location_bar_view->GetColor(
ToolbarModel::NONE, LocationBarView::BACKGROUND));
- label->SetEnabledColor(LocationBarView::GetColor(
+ label->SetEnabledColor(location_bar_view->GetColor(
ToolbarModel::NONE, LocationBarView::DEEMPHASIZED_TEXT));
AddChildView(label);
return label;
« no previous file with comments | « chrome/browser/ui/views/location_bar/keyword_hint_view.h ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698