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

Unified Diff: chrome/browser/cocoa/content_setting_bubble_cocoa.mm

Issue 5238002: Reintegrate 552 r66225-r66645.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: '' Created 10 years, 1 month 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/cocoa/content_setting_bubble_cocoa.mm
===================================================================
--- chrome/browser/cocoa/content_setting_bubble_cocoa.mm (revision 66837)
+++ chrome/browser/cocoa/content_setting_bubble_cocoa.mm (working copy)
@@ -391,32 +391,17 @@
}
- (void)sizeToFitLoadPluginsButton {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableClickToPlay)) {
- const ContentSettingBubbleModel::BubbleContent& content =
- contentSettingBubbleModel_->bubble_content();
- [loadAllPluginsButton_ setEnabled:content.load_plugins_link_enabled];
+ 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];
+ // 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];
}
}

Powered by Google App Engine
This is Rietveld 408576698