Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: chrome/browser/views/location_bar/icon_label_bubble_view.cc

Issue 3210007: Add support for a "split" incognito behavior for extensions. (Closed)
Patch Set: latest Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/views/location_bar/icon_label_bubble_view.cc
diff --git a/chrome/browser/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/views/location_bar/icon_label_bubble_view.cc
index 0f7059ba753ab92c86c49cdc2e274252a7130931..1e0159b06df4a9e4221c2eb5f47b45e61f8f1a7a 100644
--- a/chrome/browser/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/views/location_bar/icon_label_bubble_view.cc
@@ -20,7 +20,8 @@ static const int kLabelPadding = 5;
IconLabelBubbleView::IconLabelBubbleView(const int background_images[],
int contained_image,
const SkColor& color)
- : background_painter_(background_images) {
+ : background_painter_(background_images),
+ item_padding_(LocationBarView::kItemPadding) {
image_ = new views::ImageView();
AddChildView(image_);
image_->SetImage(
@@ -60,7 +61,7 @@ void IconLabelBubbleView::Layout() {
height());
const int label_height = label_->GetPreferredSize().height();
label_->SetBounds(image_->x() + image_->width() +
- LocationBarView::kItemPadding, (height() - label_height) / 2,
+ item_padding_ , (height() - label_height) / 2,
width() - GetNonLabelWidth(), label_height);
}
@@ -74,5 +75,5 @@ gfx::Size IconLabelBubbleView::GetNonLabelSize() {
int IconLabelBubbleView::GetNonLabelWidth() {
return kBubbleOuterPadding + image_->GetPreferredSize().width() +
- LocationBarView::kItemPadding + kBubbleOuterPadding;
+ item_padding_ + kBubbleOuterPadding;
}
« no previous file with comments | « chrome/browser/views/location_bar/icon_label_bubble_view.h ('k') | chrome/browser/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698