OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_BROWSER_NEW_AVATAR_BUTTON_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_NEW_AVATAR_BUTTON_CONTROLLER_H_ |
| 7 |
| 8 #import <Cocoa/Cocoa.h> |
| 9 |
| 10 #import "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 |
| 13 class Browser; |
| 14 @class ProfileChooserController; |
| 15 class ProfileInfoUpdateObserverBridge; |
| 16 |
| 17 // This view controller manages the button that sits in the top of the |
| 18 // window frame when using multi-profiles, and shows the current profile's |
| 19 // name. In Incognito, this avatar button is not used. Clicking the button |
| 20 // will open the profile menu. |
| 21 @interface NewAvatarButtonController : NSViewController { |
| 22 @private |
| 23 Browser* browser_; |
| 24 |
| 25 // Notification bridge for profile info updates. |
| 26 scoped_ptr<ProfileInfoUpdateObserverBridge> profileInfoObserver_; |
| 27 |
| 28 // The menu controller, if the menu is open. |
| 29 ProfileChooserController* menuController_; |
| 30 |
| 31 // The avatar button. |
| 32 base::scoped_nsobject<NSButton> button_; |
| 33 } |
| 34 |
| 35 // The avatar button view. |
| 36 @property(readonly, nonatomic) NSButton* buttonView; |
| 37 |
| 38 // Designated initializer. |
| 39 - (id)initWithBrowser:(Browser*)browser; |
| 40 |
| 41 // Shows the avatar bubble. |
| 42 - (void)showAvatarBubble:(NSView*)anchor; |
| 43 |
| 44 @end |
| 45 |
| 46 @interface NewAvatarButtonController (ExposedForTesting) |
| 47 - (ProfileChooserController*)menuController; |
| 48 @end |
| 49 |
| 50 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_NEW_AVATAR_BUTTON_CONTROLLER_H_ |
OLD | NEW |