Index: chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm |
index ab08960326129c004ce3a0926543a2dbd7f8d42d..d4ad48ca7289db3e6aab9b5691f6e19b8ffc65e0 100644 |
--- a/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.mm |
@@ -90,7 +90,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
- (void)initializePopupList; |
- (void)initializeGeoLists; |
- (void)sizeToFitLoadButton; |
-- (void)sizeToFitManageDoneButtons; |
+- (void)initManageDoneButtons; |
- (void)removeInfoButton; |
- (void)popupLinkClicked:(id)sender; |
- (void)clearGeolocationForCurrentHost:(id)sender; |
@@ -122,9 +122,9 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
case CONTENT_SETTINGS_TYPE_COOKIES: |
nibPath = @"ContentBlockedCookies"; break; |
case CONTENT_SETTINGS_TYPE_IMAGES: |
- nibPath = @"ContentBlockedImages"; break; |
case CONTENT_SETTINGS_TYPE_JAVASCRIPT: |
- nibPath = @"ContentBlockedJavaScript"; break; |
+ case CONTENT_SETTINGS_TYPE_PPAPI_BROKER: |
+ nibPath = @"ContentBlockedSimple"; break; |
case CONTENT_SETTINGS_TYPE_PLUGINS: |
nibPath = @"ContentBlockedPlugins"; break; |
case CONTENT_SETTINGS_TYPE_POPUPS: |
@@ -146,7 +146,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
case CONTENT_SETTINGS_TYPE_MOUSELOCK: |
case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: |
case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
- case CONTENT_SETTINGS_TYPE_PPAPI_BROKER: |
case CONTENT_SETTINGS_NUM_TYPES: |
NOTREACHED(); |
} |
@@ -417,7 +416,12 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
} |
} |
-- (void)sizeToFitManageDoneButtons { |
+- (void)initManageDoneButtons { |
+ const ContentSettingBubbleModel::BubbleContent& content = |
+ contentSettingBubbleModel_->bubble_content(); |
+ [manageButton_ setTitle:base::SysUTF8ToNSString(content.manage_link)]; |
+ [GTMUILocalizerAndLayoutTweaker sizeToFitView:manageButton_]; |
+ |
CGFloat actualWidth = NSWidth([[[self window] contentView] frame]); |
CGFloat requiredWidth = NSMaxX([manageButton_ frame]) + kManageDonePadding + |
NSWidth([[doneButton_ superview] frame]) - NSMinX([doneButton_ frame]); |
@@ -439,7 +443,7 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
[[self bubble] setArrowLocation:info_bubble::kTopRight]; |
// Adapt window size to bottom buttons. Do this before all other layouting. |
- [self sizeToFitManageDoneButtons]; |
+ [self initManageDoneButtons]; |
[self initializeTitle]; |