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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/avatar_base_controller.h

Issue 1221173003: [Mac] Inform reference counted objects that hold a weak Browser* when the Browser is being destroye… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add HasWeakBrowserPointer protocol. Allow -dealloc without preceding -browserWillBeDestroyed. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_
7 7
8 #import <AppKit/AppKit.h> 8 #import <AppKit/AppKit.h>
9 9
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #import "chrome/browser/ui/cocoa/has_weak_browser_pointer.h"
erikchen 2015/07/08 18:02:17 ordering.
jackhou1 2015/07/09 03:48:02 Done.
12 #include "chrome/browser/ui/browser_window.h" 13 #include "chrome/browser/ui/browser_window.h"
13 14
14 @class BaseBubbleController; 15 @class BaseBubbleController;
15 class Browser; 16 class Browser;
16 class ProfileInfoUpdateObserver; 17 class ProfileInfoUpdateObserver;
17 18
18 // This view controller manages the button that sits in the top of the 19 // This view controller manages the button that sits in the top of the
19 // window frame when using multi-profiles, and shows information about the 20 // window frame when using multi-profiles, and shows information about the
20 // current profile. Clicking the button will open the profile menu. 21 // current profile. Clicking the button will open the profile menu.
21 @interface AvatarBaseController : NSViewController { 22 @interface AvatarBaseController : NSViewController<HasWeakBrowserPointer> {
22 @protected 23 @protected
23 Browser* browser_; 24 Browser* browser_;
24 25
25 // The avatar button. Child classes are responsible for implementing it. 26 // The avatar button. Child classes are responsible for implementing it.
26 base::scoped_nsobject<NSButton> button_; 27 base::scoped_nsobject<NSButton> button_;
27 28
28 @private 29 @private
29 // The menu controller, if the menu is open. 30 // The menu controller, if the menu is open.
30 BaseBubbleController* menuController_; 31 BaseBubbleController* menuController_;
31 32
(...skipping 13 matching lines...) Expand all
45 withServiceType:(signin::GAIAServiceType)serviceType; 46 withServiceType:(signin::GAIAServiceType)serviceType;
46 47
47 - (void)closeAvatarBubble; 48 - (void)closeAvatarBubble;
48 @end 49 @end
49 50
50 @interface AvatarBaseController (ExposedForTesting) 51 @interface AvatarBaseController (ExposedForTesting)
51 - (BaseBubbleController*)menuController; 52 - (BaseBubbleController*)menuController;
52 @end 53 @end
53 54
54 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_ 55 #endif // CHROME_BROWSER_UI_COCOA_PROFILES_AVATAR_BASE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698