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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/keyword_hint_view.h" 5 #include "chrome/browser/ui/views/location_bar/keyword_hint_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 pref = leading_label_->GetPreferredSize(); 123 pref = leading_label_->GetPreferredSize();
124 leading_label_->SetBounds(x, 0, pref.width(), height()); 124 leading_label_->SetBounds(x, 0, pref.width(), height());
125 125
126 x += pref.width() + kTabButtonImage->width(); 126 x += pref.width() + kTabButtonImage->width();
127 pref = trailing_label_->GetPreferredSize(); 127 pref = trailing_label_->GetPreferredSize();
128 trailing_label_->SetBounds(x, 0, pref.width(), height()); 128 trailing_label_->SetBounds(x, 0, pref.width(), height());
129 } 129 }
130 } 130 }
131 131
132 views::Label* KeywordHintView::CreateLabel() { 132 views::Label* KeywordHintView::CreateLabel() {
133 const ui::NativeTheme* theme = GetNativeTheme();
133 views::Label* label = new views::Label(); 134 views::Label* label = new views::Label();
134 label->SetBackgroundColor(LocationBarView::GetColor( 135 label->SetBackgroundColor(LocationBarView::GetColor(
135 ToolbarModel::NONE, LocationBarView::BACKGROUND)); 136 theme, ToolbarModel::NONE, LocationBarView::BACKGROUND));
136 label->SetEnabledColor(LocationBarView::GetColor( 137 label->SetEnabledColor(LocationBarView::GetColor(
137 ToolbarModel::NONE, LocationBarView::DEEMPHASIZED_TEXT)); 138 theme, ToolbarModel::NONE, LocationBarView::DEEMPHASIZED_TEXT));
138 AddChildView(label); 139 AddChildView(label);
139 return label; 140 return label;
140 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698