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

Unified Diff: chrome/browser/ui/cocoa/browser/new_avatar_button_controller.h

Issue 117533002: [Mac] Redesign of the avatar menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tabstrip width Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698