Chromium Code Reviews| Index: chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h |
| diff --git a/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h b/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h |
| index ed2d3add801d8b843b411cacbd2f797d3ae24966..93e36f8ac9edb368b78fa5f90638967cd0c03f8e 100644 |
| --- a/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h |
| +++ b/chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h |
| @@ -55,7 +55,7 @@ class Browser; |
| @interface AvatarMenuItemController : NSViewController<NSAnimationDelegate> { |
| @private |
| // The parent menu controller; owns this. |
| - __weak AvatarMenuBubbleController* controller_; |
| + AvatarMenuBubbleController* controller_; // weak |
| // The index of the item in the AvatarMenu. |
| size_t menuIndex_; |
| @@ -68,22 +68,22 @@ class Browser; |
| base::scoped_nsobject<NSAnimation> linkAnimation_; |
| // Instance variables that back the outlets. |
| - __weak NSImageView* iconView_; |
| - __weak NSImageView* activeView_; |
| - __weak NSTextField* nameField_; |
| + NSImageView* iconView_; |
| + NSImageView* activeView_; |
| + NSTextField* nameField_; |
| // These two views sit on top of each other, and only one is visible at a |
| // time. The editButton_ is visible when the mouse is over the item and the |
| // emailField_ is visible otherwise. |
| - __weak NSTextField* emailField_; |
| - __weak NSButton* editButton_; |
| + NSTextField* emailField_; |
| + NSButton* editButton_; |
| } |
| @property(readonly, nonatomic) size_t menuIndex; |
| @property(assign, nonatomic) BOOL isHighlighted; |
| -@property(assign, nonatomic) IBOutlet NSImageView* iconView; |
| -@property(assign, nonatomic) IBOutlet NSImageView* activeView; |
| -@property(assign, nonatomic) IBOutlet NSTextField* nameField; |
| -@property(assign, nonatomic) IBOutlet NSTextField* emailField; |
| -@property(assign, nonatomic) IBOutlet NSButton* editButton; |
| +@property(readonly, nonatomic) IBOutlet NSImageView* iconView; |
|
Robert Sesek
2015/11/03 15:41:11
Why the change from assign -> readonly? That doesn
Nico
2015/11/03 16:01:18
It can't stay assign without the __weak. I could c
Robert Sesek
2015/11/03 22:03:51
If they're now retained, won't they be leaked? (Ma
Nico
2015/11/03 22:15:58
Done.
|
| +@property(readonly, nonatomic) IBOutlet NSImageView* activeView; |
| +@property(readonly, nonatomic) IBOutlet NSTextField* nameField; |
| +@property(readonly, nonatomic) IBOutlet NSTextField* emailField; |
| +@property(readonly, nonatomic) IBOutlet NSButton* editButton; |
| // Designated initializer. |
| - (id)initWithMenuIndex:(size_t)menuIndex |
| @@ -108,7 +108,8 @@ class Browser; |
| @interface AvatarMenuItemView : NSView { |
| @private |
| // The controller that manages this. |
| - __weak AvatarMenuItemController* viewController_; |
| + // weak to not form a reference cycle with the controller. |
| + __unsafe_unretained AvatarMenuItemController* viewController_; |
| // Used to highlight the background on hover. |
| ui::ScopedCrTrackingArea trackingArea_; |