Chromium Code Reviews| Index: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm | 
| diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm | 
| index db647f8f6cf83e360090cc8347955909ec406ba6..04aceff9051f90c08cc337603b4e3de6f5042aef 100644 | 
| --- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm | 
| +++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm | 
| @@ -28,6 +28,15 @@ NSColor* HoveredBackgroundColor() { | 
| @implementation OmniboxPopupCell | 
| +- (CGFloat)additionalOffset { | 
| + return additionalOffset_; | 
| +} | 
| 
 
Scott Hess - ex-Googler
2013/12/14 00:40:57
Is this method needed?  -setAdditionalOffset: is n
 
Anuj
2013/12/16 02:53:19
Done.
 
 | 
| + | 
| +- (void)setAdditionalOffset:(CGFloat)additionalOffset { | 
| + additionalOffset_ = additionalOffset; | 
| +} | 
| + | 
| + | 
| - (id)init { | 
| self = [super init]; | 
| if (self) { | 
| @@ -41,6 +50,10 @@ NSColor* HoveredBackgroundColor() { | 
| return self; | 
| } | 
| +- (CGFloat)textOffset { | 
| + return kTextXOffset + [self additionalOffset]; | 
| +} | 
| + | 
| // The default NSButtonCell drawing leaves the image flush left and | 
| // the title next to the image. This spaces things out to line up | 
| // with the star button and autocomplete field. | 
| @@ -77,8 +90,9 @@ NSColor* HoveredBackgroundColor() { | 
| NSAttributedString* title = [self attributedTitle]; | 
| if (title && [title length]) { | 
| NSRect titleRect = cellFrame; | 
| - titleRect.size.width -= kTextXOffset; | 
| - titleRect.origin.x += kTextXOffset; | 
| + CGFloat textXOffset = [self textOffset]; | 
| + titleRect.size.width -= textXOffset; | 
| + titleRect.origin.x += textXOffset; | 
| [self drawTitle:title withFrame:titleRect inView:controlView]; | 
| } | 
| } |