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_AVATAR_BASE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BROWSER_AVATAR_BASE_CONTROLLER_H_ |
| 7 |
| 8 #import <AppKit/AppKit.h> |
| 9 |
| 10 #import "base/mac/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 |
| 13 @class BaseBubbleController; |
| 14 class Browser; |
| 15 class ProfileInfoUpdateObserver; |
| 16 |
| 17 // This view controller manages the button that sits in the top of the |
| 18 // window frame when using multi-profiles, and shows information about the |
| 19 // current profile. Clicking the button will open the profile menu. |
| 20 @interface AvatarBaseController : NSViewController { |
| 21 @protected |
| 22 Browser* browser_; |
| 23 |
| 24 // The avatar button. Child classes are responsible for implementing it. |
| 25 base::scoped_nsobject<NSButton> button_; |
| 26 |
| 27 @private |
| 28 // The menu controller, if the menu is open. |
| 29 BaseBubbleController* menuController_; |
| 30 |
| 31 // Observer that listens for updates to the ProfileInfoCache. |
| 32 scoped_ptr<ProfileInfoUpdateObserver> profileInfoObserver_; |
| 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 AvatarBaseController (ExposedForTesting) |
| 47 - (BaseBubbleController*)menuController; |
| 48 @end |
| 49 |
| 50 #endif // CHROME_BROWSER_UI_COCOA_BROWSER_AVATAR_BASE_CONTROLLER_H_ |
OLD | NEW |