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 6d8317566f6de23905e6cb25264a899f2490062a..f989fa123edec83b3b4d1778c8f5ea36a8fdf85a 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; |
Nico
2012/12/14 23:02:26
Do you feel the nib files for the content settings
Bernhard Bauer
2012/12/15 05:44:04
Yes, that probably makes sense. For starters we co
|
case CONTENT_SETTINGS_TYPE_PLUGINS: |
nibPath = @"ContentBlockedPlugins"; break; |
case CONTENT_SETTINGS_TYPE_POPUPS: |
@@ -145,7 +145,6 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) { |
case CONTENT_SETTINGS_TYPE_MEDIASTREAM: |
case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: |
case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: |
- case CONTENT_SETTINGS_TYPE_PPAPI_BROKER: |
case CONTENT_SETTINGS_NUM_TYPES: |
NOTREACHED(); |
} |
@@ -416,7 +415,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]); |
@@ -438,7 +442,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]; |