 Chromium Code Reviews
 Chromium Code Reviews Issue 2334283004:
  Change explanation string for the Subresource Filter prompt.  (Closed)
    
  
    Issue 2334283004:
  Change explanation string for the Subresource Filter prompt.  (Closed) 
  | 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 e0e09f2c99a5d4b49476dfc412164237bc71e119..4dffd5015b4fde372295b7c33da50cfe50bda1bc 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 | 
| @@ -212,6 +212,7 @@ class ContentSettingBubbleWebContentsObserverBridge | 
| referenceFrame:(NSRect)referenceFrame; | 
| - (void)initializeBlockedPluginsList; | 
| - (void)initializeTitle; | 
| +- (void)initializeMessage; | 
| - (void)initializeRadioGroup; | 
| - (void)initializeItemList; | 
| - (void)initializeGeoLists; | 
| @@ -329,6 +330,25 @@ const ContentTypeToNibPath kNibPaths[] = { | 
| [titleLabel_ setFrame:titleFrame]; | 
| } | 
| +- (void)initializeMessage { | 
| + if (!messageLabel_) | 
| + return; | 
| + | 
| + NSString* label = base::SysUTF16ToNSString( | 
| + contentSettingBubbleModel_->bubble_content().message); | 
| + [messageLabel_ setStringValue:label]; | 
| + | 
| + // Layout title post-localization. | 
| + CGFloat deltaY = [GTMUILocalizerAndLayoutTweaker | 
| + sizeToFitFixedWidthTextField:messageLabel_]; | 
| + NSRect windowFrame = [[self window] frame]; | 
| + windowFrame.size.height += deltaY; | 
| + [[self window] setFrame:windowFrame display:NO]; | 
| + NSRect messageFrame = [messageLabel_ frame]; | 
| + messageFrame.origin.y -= deltaY; | 
| + [messageLabel_ setFrame:messageFrame]; | 
| +} | 
| + | 
| - (void)initializeRadioGroup { | 
| // NOTE! Tags in the xib files must match the order of the radio buttons | 
| // passed in the radio_group and be 1-based, not 0-based. | 
| @@ -770,6 +790,8 @@ const ContentTypeToNibPath kNibPaths[] = { | 
| [self initializeTitle]; | 
| 
Nico
2016/09/15 19:26:50
nit: i wouldn't put a newline here
 
melandory
2016/09/15 19:55:02
Done.
 | 
| + [self initializeMessage]; | 
| + | 
| // Note that the per-content-type methods and |initializeRadioGroup| below | 
| // must be kept in the correct order, as they make interdependent adjustments | 
| // of the bubble's height. |