Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5667)

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size_t -> int Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
index 73e2f32a3a9fabebe0fe8d00427133f376489d65..a2488345eca309a127ca8eb05cd9855c82635908 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm
@@ -48,13 +48,13 @@
frame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self)
- delegate_ = delegate;
+ popup_delegate_ = delegate;
return self;
}
- (void)delegateDestroyed {
- delegate_ = NULL;
+ popup_delegate_ = NULL;
}
- (void)drawSeparatorWithBounds:(NSRect)bounds {
@@ -90,7 +90,7 @@
- (void)mouseUp:(NSEvent*)theEvent {
// If the view is in the process of being destroyed, abort.
- if (!delegate_)
+ if (!popup_delegate_)
return;
// Only accept single-click.
@@ -101,20 +101,21 @@
fromView:nil];
if (NSPointInRect(location, [self bounds])) {
- delegate_->SetSelectionAtPoint(gfx::Point(NSPointToCGPoint(location)));
- delegate_->AcceptSelectedLine();
+ popup_delegate_->SetSelectionAtPoint(
+ gfx::Point(NSPointToCGPoint(location)));
+ popup_delegate_->AcceptSelectedLine();
}
}
- (void)mouseMoved:(NSEvent*)theEvent {
// If the view is in the process of being destroyed, abort.
- if (!delegate_)
+ if (!popup_delegate_)
return;
NSPoint location = [self convertPoint:[theEvent locationInWindow]
fromView:nil];
- delegate_->SetSelectionAtPoint(gfx::Point(NSPointToCGPoint(location)));
+ popup_delegate_->SetSelectionAtPoint(gfx::Point(NSPointToCGPoint(location)));
}
- (void)mouseDragged:(NSEvent*)theEvent {
@@ -123,17 +124,17 @@
- (void)mouseExited:(NSEvent*)theEvent {
// If the view is in the process of being destroyed, abort.
- if (!delegate_)
+ if (!popup_delegate_)
return;
- delegate_->SelectionCleared();
+ popup_delegate_->SelectionCleared();
}
#pragma mark -
#pragma mark Messages from AutofillPopupViewBridge:
- (void)updateBoundsAndRedrawPopup {
- NSRect frame = NSRectFromCGRect(delegate_->popup_bounds().ToCGRect());
+ NSRect frame = NSRectFromCGRect(popup_delegate_->popup_bounds().ToCGRect());
// Flip coordinates back into Cocoa-land. The controller's platform-neutral
// coordinate space places the origin at the top-left of the first screen,
@@ -160,8 +161,8 @@
[window setOpaque:YES];
[self updateBoundsAndRedrawPopup];
- [[delegate_->container_view() window] addChildWindow:window
- ordered:NSWindowAbove];
+ [[popup_delegate_->container_view() window] addChildWindow:window
+ ordered:NSWindowAbove];
}
- (void)hidePopup {

Powered by Google App Engine
This is Rietveld 408576698