Index: chrome/browser/cocoa/content_setting_bubble_cocoa.mm |
diff --git a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm |
index dda55f5a0e70bb2e285145a915926deca006dbec..dc8b967630d6f7c8406fba5de7eca3f4ca4819d8 100644 |
--- a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm |
+++ b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm |
@@ -391,32 +391,17 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
} |
- (void)sizeToFitLoadPluginsButton { |
- if (!CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableClickToPlay)) { |
- const ContentSettingBubbleModel::BubbleContent& content = |
- contentSettingBubbleModel_->bubble_content(); |
- [loadAllPluginsButton_ setEnabled:content.load_plugins_link_enabled]; |
- |
- // Resize horizontally to fit button if necessary. |
- NSRect windowFrame = [[self window] frame]; |
- int widthNeeded = NSWidth([loadAllPluginsButton_ frame]) + |
- 2 * NSMinX([loadAllPluginsButton_ frame]); |
- if (NSWidth(windowFrame) < widthNeeded) { |
- windowFrame.size.width = widthNeeded; |
- [[self window] setFrame:windowFrame display:NO]; |
- } |
- } else { |
- // Remove button and resize vertically. |
- int deltaY = kLoadAllPluginsButtonVerticalPadding + |
- NSHeight([loadAllPluginsButton_ frame]); |
- [loadAllPluginsButton_ removeFromSuperview]; |
- NSRect frame = [[self window] frame]; |
- frame.size.height -= deltaY; |
- [[self window] setFrame:frame display:NO]; |
- NSPoint radioOrigin = [allowBlockRadioGroup_ frame].origin; |
- radioOrigin.y -= deltaY; |
- [allowBlockRadioGroup_ setFrameOrigin:radioOrigin]; |
- [allowBlockRadioGroup_ setNeedsDisplay]; |
+ const ContentSettingBubbleModel::BubbleContent& content = |
+ contentSettingBubbleModel_->bubble_content(); |
+ [loadAllPluginsButton_ setEnabled:content.load_plugins_link_enabled]; |
+ |
+ // Resize horizontally to fit button if necessary. |
+ NSRect windowFrame = [[self window] frame]; |
+ int widthNeeded = NSWidth([loadAllPluginsButton_ frame]) + |
+ 2 * NSMinX([loadAllPluginsButton_ frame]); |
+ if (NSWidth(windowFrame) < widthNeeded) { |
+ windowFrame.size.width = widthNeeded; |
+ [[self window] setFrame:windowFrame display:NO]; |
} |
} |