| Index: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
|
| index 53abdfa34c4576a4ddbb7113116d84d3ec58884a..ff8581c3c5d438d91eae92566f64213585922c89 100644
|
| --- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
|
| @@ -72,14 +72,17 @@ using autofill::AutofillPopupView;
|
|
|
| - (id)initWithFrame:(NSRect)frame {
|
| NOTREACHED();
|
| - return [self initWithController:NULL frame:frame];
|
| + return [self initWithController:NULL frame:frame delegate:NULL];
|
| }
|
|
|
| - (id)initWithController:(autofill::AutofillPopupController*)controller
|
| - frame:(NSRect)frame {
|
| + frame:(NSRect)frame
|
| + delegate:(autofill::AutofillPopupViewBridgeDelegate*)delegate {
|
| self = [super initWithDelegate:controller frame:frame];
|
| - if (self)
|
| + if (self) {
|
| controller_ = controller;
|
| + bridge_delegate_ = delegate;
|
| + }
|
|
|
| return self;
|
| }
|
| @@ -97,7 +100,7 @@ using autofill::AutofillPopupView;
|
| for (size_t i = 0; i < controller_->GetLineCount(); ++i) {
|
| // Skip rows outside of the dirty rect.
|
| NSRect rowBounds =
|
| - NSRectFromCGRect(controller_->GetRowBounds(i).ToCGRect());
|
| + NSRectFromCGRect(bridge_delegate_->GetRowBounds(i).ToCGRect());
|
| if (!NSIntersectsRect(rowBounds, dirtyRect))
|
| continue;
|
| const autofill::Suggestion& suggestion = controller_->GetSuggestionAt(i);
|
| @@ -134,7 +137,7 @@ using autofill::AutofillPopupView;
|
|
|
| - (void)invalidateRow:(size_t)row {
|
| NSRect dirty_rect =
|
| - NSRectFromCGRect(controller_->GetRowBounds(row).ToCGRect());
|
| + NSRectFromCGRect(bridge_delegate_->GetRowBounds(row).ToCGRect());
|
| [self setNeedsDisplayInRect:dirty_rect];
|
| }
|
|
|
| @@ -252,7 +255,7 @@ using autofill::AutofillPopupView;
|
| if (icon.empty())
|
| return nil;
|
|
|
| - int iconId = controller_->GetIconResourceID(icon);
|
| + int iconId = bridge_delegate_->GetIconResourceID(icon);
|
| DCHECK_NE(-1, iconId);
|
|
|
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
|
|