| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |