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

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

Issue 4643007: Move click-to-play to about:flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 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
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];
}
}

Powered by Google App Engine
This is Rietveld 408576698