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

Unified Diff: chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm

Issue 1242383005: Remove unused code in ConfirmBubbleModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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/ui/cocoa/confirm_bubble_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
index 9c2ec091f1439b1a83d024c4a2ac7c8000c4bbf5..27b722a8d32ae8be7d467172c0fa837be79aeb51 100644
--- a/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
+++ b/chrome/browser/ui/cocoa/confirm_bubble_cocoa.mm
@@ -28,9 +28,6 @@ const float kBubbleWindowEdge = 0.7f;
// Vertical spacing between a label and some control.
const int kLabelToControlVerticalSpacing = 8;
-// Horizontal spacing between controls that are logically related.
-const int kRelatedControlHorizontalSpacing = 8;
-
// Vertical spacing between controls that are logically related.
const int kRelatedControlVerticalSpacing = 8;
@@ -238,16 +235,6 @@ void ShowConfirmBubble(gfx::NativeWindow window,
left = kButtonHEdgeMargin;
right = NSWidth(frameRect);
bottom += height + kLabelToControlVerticalSpacing;
- height = 0;
- NSImage* iconImage = [controller_ icon];
- if (iconImage) {
- icon_.reset([[NSImageView alloc] initWithFrame:NSMakeRect(
- left, bottom, [iconImage size].width, [iconImage size].height)]);
- [icon_.get() setImage:iconImage];
- [self addSubview:icon_.get()];
- left += NSWidth([icon_.get() frame]) + kRelatedControlHorizontalSpacing;
- height = std::max(height, NSHeight([icon_.get() frame]));
- }
titleLabel_.reset([[NSTextView alloc]
initWithFrame:NSMakeRect(left, bottom, right - left, 0)]);
[titleLabel_.get() setString:[controller_ title]];
@@ -258,7 +245,7 @@ void ShowConfirmBubble(gfx::NativeWindow window,
[titleLabel_.get() setDrawsBackground:NO];
[titleLabel_.get() sizeToFit];
[self addSubview:titleLabel_.get()];
- height = std::max(height, NSHeight([titleLabel_.get() frame]));
+ height = NSHeight([titleLabel_.get() frame]);
// Adjust the frame rectangle of this bubble so we can show all controls.
NSRect parentRect = [parent_ frame];
« no previous file with comments | « chrome/browser/renderer_context_menu/spelling_bubble_model.cc ('k') | chrome/browser/ui/cocoa/confirm_bubble_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698