OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "app/resource_bundle.h" | |
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 7 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
9 #include "gfx/canvas.h" | 8 #include "gfx/canvas.h" |
| 9 #include "ui/base/resource/resource_bundle.h" |
10 #include "views/controls/image_view.h" | 10 #include "views/controls/image_view.h" |
11 #include "views/controls/label.h" | 11 #include "views/controls/label.h" |
12 | 12 |
13 // Amount of padding at the edges of the bubble. | 13 // Amount of padding at the edges of the bubble. |
14 static const int kBubbleOuterPadding = | 14 static const int kBubbleOuterPadding = |
15 LocationBarView::kEdgeItemPadding - LocationBarView::kBubblePadding; | 15 LocationBarView::kEdgeItemPadding - LocationBarView::kBubblePadding; |
16 | 16 |
17 // Amount of padding after the label. | 17 // Amount of padding after the label. |
18 static const int kLabelPadding = 5; | 18 static const int kLabelPadding = 5; |
19 | 19 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 gfx::Size IconLabelBubbleView::GetNonLabelSize() { | 72 gfx::Size IconLabelBubbleView::GetNonLabelSize() { |
73 return gfx::Size(GetNonLabelWidth(), background_painter_.height()); | 73 return gfx::Size(GetNonLabelWidth(), background_painter_.height()); |
74 } | 74 } |
75 | 75 |
76 int IconLabelBubbleView::GetNonLabelWidth() { | 76 int IconLabelBubbleView::GetNonLabelWidth() { |
77 return kBubbleOuterPadding + image_->GetPreferredSize().width() + | 77 return kBubbleOuterPadding + image_->GetPreferredSize().width() + |
78 item_padding_ + kBubbleOuterPadding; | 78 item_padding_ + kBubbleOuterPadding; |
79 } | 79 } |
OLD | NEW |