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/icon_label_bubble_view.h" | 5 #include "chrome/browser/ui/views/location_bar/icon_label_bubble_view.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
9 #include "grit/theme_resources.h" | 9 #include "grit/theme_resources_standard.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/gfx/canvas.h" | 11 #include "ui/gfx/canvas.h" |
12 #include "ui/views/controls/image_view.h" | 12 #include "ui/views/controls/image_view.h" |
13 #include "ui/views/controls/label.h" | 13 #include "ui/views/controls/label.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Amount of padding at the edges of the bubble. | 17 // Amount of padding at the edges of the bubble. |
18 // | 18 // |
19 // This can't be statically initialized because | 19 // This can't be statically initialized because |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 int IconLabelBubbleView::GetPreLabelWidth() const { | 92 int IconLabelBubbleView::GetPreLabelWidth() const { |
93 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 93 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
94 return GetBubbleOuterPadding() + | 94 return GetBubbleOuterPadding() + |
95 rb.GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)->width() + | 95 rb.GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)->width() + |
96 LocationBarView::GetItemPadding(); | 96 LocationBarView::GetItemPadding(); |
97 } | 97 } |
98 | 98 |
99 int IconLabelBubbleView::GetNonLabelWidth() const { | 99 int IconLabelBubbleView::GetNonLabelWidth() const { |
100 return GetPreLabelWidth() + GetBubbleOuterPadding(); | 100 return GetPreLabelWidth() + GetBubbleOuterPadding(); |
101 } | 101 } |
OLD | NEW |