| Index: chrome/browser/ui/cocoa/browser/new_avatar_button_controller.h
|
| diff --git a/chrome/browser/ui/cocoa/browser/new_avatar_button_controller.h b/chrome/browser/ui/cocoa/browser/new_avatar_button_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0322e0bc3c560a177eb24448e00008275bc98322
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/cocoa/browser/new_avatar_button_controller.h
|
| @@ -0,0 +1,50 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_COCOA_BROWSER_NEW_AVATAR_BUTTON_CONTROLLER_H_
|
| +#define CHROME_BROWSER_UI_COCOA_BROWSER_NEW_AVATAR_BUTTON_CONTROLLER_H_
|
| +
|
| +#import <Cocoa/Cocoa.h>
|
| +
|
| +#import "base/mac/scoped_nsobject.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +
|
| +class Browser;
|
| +@class ProfileChooserController;
|
| +class ProfileInfoUpdateObserverBridge;
|
| +
|
| +// This view controller manages the button that sits in the top of the
|
| +// window frame when using multi-profiles, and shows the current profile's
|
| +// name. In Incognito, this avatar button is not used. Clicking the button
|
| +// will open the profile menu.
|
| +@interface NewAvatarButtonController : NSViewController {
|
| + @private
|
| + Browser* browser_;
|
| +
|
| + // Notification bridge for profile info updates.
|
| + scoped_ptr<ProfileInfoUpdateObserverBridge> profileInfoObserver_;
|
| +
|
| + // The menu controller, if the menu is open.
|
| + ProfileChooserController* menuController_;
|
| +
|
| + // The avatar button.
|
| + base::scoped_nsobject<NSButton> button_;
|
| +}
|
| +
|
| +// The avatar button view.
|
| +@property(readonly, nonatomic) NSButton* buttonView;
|
| +
|
| +// Designated initializer.
|
| +- (id)initWithBrowser:(Browser*)browser;
|
| +
|
| +// Shows the avatar bubble.
|
| +- (void)showAvatarBubble:(NSView*)anchor;
|
| +
|
| +@end
|
| +
|
| +@interface NewAvatarButtonController (ExposedForTesting)
|
| +- (ProfileChooserController*)menuController;
|
| +@end
|
| +
|
| +#endif // CHROME_BROWSER_UI_COCOA_BROWSER_NEW_AVATAR_BUTTON_CONTROLLER_H_
|
|
|