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

Unified Diff: chrome/browser/ui/cocoa/profiles/avatar_menu_bubble_controller.h

Issue 1407103008: mac: Stop using __weak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no ifdef Created 5 years, 1 month 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/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_;

Powered by Google App Engine
This is Rietveld 408576698