OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/location_bar/keyword_hint_view.h" | 5 #include "chrome/browser/views/location_bar/keyword_hint_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_command_ids.h" |
11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/search_engines/template_url_model.h" | 12 #include "chrome/browser/search_engines/template_url_model.h" |
13 #include "gfx/canvas.h" | 13 #include "gfx/canvas.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
16 #include "views/controls/label.h" | 16 #include "views/controls/label.h" |
17 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
18 | 18 |
19 // Amount of space to offset the tab image from the top of the view by. | 19 // Amount of space to offset the tab image from the top of the view by. |
20 static const int kTabImageYOffset = 4; | 20 static const int kTabImageYOffset = 4; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 if (show_labels) { | 119 if (show_labels) { |
120 pref = leading_label_->GetPreferredSize(); | 120 pref = leading_label_->GetPreferredSize(); |
121 leading_label_->SetBounds(x, 0, pref.width(), height()); | 121 leading_label_->SetBounds(x, 0, pref.width(), height()); |
122 | 122 |
123 x += pref.width() + kTabButtonBitmap->width(); | 123 x += pref.width() + kTabButtonBitmap->width(); |
124 pref = trailing_label_->GetPreferredSize(); | 124 pref = trailing_label_->GetPreferredSize(); |
125 trailing_label_->SetBounds(x, 0, pref.width(), height()); | 125 trailing_label_->SetBounds(x, 0, pref.width(), height()); |
126 } | 126 } |
127 } | 127 } |
OLD | NEW |