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" |
11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/search_engines/template_url_service.h" | 13 #include "chrome/browser/search_engines/template_url_service.h" |
14 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
15 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 15 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources_standard.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 #include "ui/gfx/canvas.h" | 20 #include "ui/gfx/canvas.h" |
21 #include "ui/gfx/image/image_skia.h" | 21 #include "ui/gfx/image/image_skia.h" |
22 #include "ui/views/controls/label.h" | 22 #include "ui/views/controls/label.h" |
23 | 23 |
24 // Amount of space to offset the tab image from the top of the view by. | 24 // Amount of space to offset the tab image from the top of the view by. |
25 static const int kTabImageYOffset = 4; | 25 static const int kTabImageYOffset = 4; |
26 | 26 |
27 // The tab key image. | 27 // The tab key image. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 views::Label* KeywordHintView::CreateLabel() { | 132 views::Label* KeywordHintView::CreateLabel() { |
133 views::Label* label = new views::Label(); | 133 views::Label* label = new views::Label(); |
134 label->SetBackgroundColor(LocationBarView::GetColor(ToolbarModel::NONE, | 134 label->SetBackgroundColor(LocationBarView::GetColor(ToolbarModel::NONE, |
135 LocationBarView::BACKGROUND)); | 135 LocationBarView::BACKGROUND)); |
136 label->SetEnabledColor(LocationBarView::GetColor(ToolbarModel::NONE, | 136 label->SetEnabledColor(LocationBarView::GetColor(ToolbarModel::NONE, |
137 LocationBarView::DEEMPHASIZED_TEXT)); | 137 LocationBarView::DEEMPHASIZED_TEXT)); |
138 AddChildView(label); | 138 AddChildView(label); |
139 return label; | 139 return label; |
140 } | 140 } |
OLD | NEW |