Chromium Code Reviews| Index: chrome/browser/ui/cocoa/browser/avatar_button_controller.h |
| diff --git a/chrome/browser/ui/cocoa/browser/avatar_button_controller.h b/chrome/browser/ui/cocoa/browser/avatar_button_controller.h |
| index 739af1e2c329bacf5288018576f7b670de600e2f..1bf06f903c65a57f4ee5a3757c06b486166f255e 100644 |
| --- a/chrome/browser/ui/cocoa/browser/avatar_button_controller.h |
| +++ b/chrome/browser/ui/cocoa/browser/avatar_button_controller.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// 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. |
| @@ -10,47 +10,36 @@ |
| #import "base/mac/scoped_nsobject.h" |
| #include "base/memory/scoped_ptr.h" |
| -@class AvatarLabelButton; |
| -@class BaseBubbleController; |
| class Browser; |
| +@class BaseBubbleController; |
| +class ProfileInfoUpdateObserver; |
| -namespace AvatarButtonControllerInternal { |
| -class Observer; |
| -} |
| - |
| -// This view controller manages the button/image that sits in the top of the |
| -// window frame when using multi-profiles. It shows the current profile's |
| -// avatar, or, when in Incognito, the spy dude. With multi-profiles, clicking |
| -// will open the profile menu; in Incognito, clicking will do nothing. |
| +// 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. Clicking the button will open the profile menu. |
| @interface AvatarButtonController : NSViewController { |
| - @private |
| + @protected |
| Browser* browser_; |
| - // Notification bridge for profile info updates. |
| - scoped_ptr<AvatarButtonControllerInternal::Observer> observer_; |
| - |
| - // The menu controller, if the menu is open. |
| - __weak BaseBubbleController* menuController_; |
| - |
| // The avatar button. |
| base::scoped_nsobject<NSButton> button_; |
| - // The managed user avatar label button. Only used for managed user profiles. |
| - base::scoped_nsobject<AvatarLabelButton> labelButton_; |
| + @private |
| + // The menu controller, if the menu is open. |
| + BaseBubbleController* menuController_; |
| + |
| + // Observer that listens for updates to the ProfileInfoCache. |
| + scoped_ptr<ProfileInfoUpdateObserver> profileInfoObserver_; |
| } |
| // The avatar button view. |
| @property(readonly, nonatomic) NSButton* buttonView; |
| -// The managed user avatar label button view. |
| -@property(readonly, nonatomic) NSButton* labelButtonView; |
| - |
| // Designated initializer. |
| - (id)initWithBrowser:(Browser*)browser; |
| -// Sets the image to be used as the avatar. This will have a drop shadow applied |
| -// and will be resized to the frame of the button. |
| -- (void)setImage:(NSImage*)image; |
| +// Initializer to be used by child classes. |
|
Nico
2014/01/14 03:56:02
initWithBrowser: is marked as "designated initiali
noms (inactive)
2014/01/15 22:07:47
Done.
|
| +- (id)init; |
| // Shows the avatar bubble. |
| - (void)showAvatarBubble:(NSView*)anchor; |