OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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_PROFILE_MENU_BUTTON_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_PROFILE_MENU_BUTTON_H_ | |
7 #pragma once | |
8 | |
9 #import <Cocoa/Cocoa.h> | |
10 | |
11 #include "base/memory/scoped_nsobject.h" | |
12 #include "base/memory/scoped_ptr.h" | |
13 #import "chrome/browser/ui/cocoa/menu_button.h" | |
14 #import "chrome/browser/ui/cocoa/menu_controller.h" | |
15 | |
16 class ProfileMenuModel; | |
17 | |
18 // PopUp button that shows the multiprofile menu. | |
19 @interface ProfileMenuButton : MenuButton { | |
20 @private | |
21 BOOL shouldShowProfileDisplayName_; | |
22 scoped_nsobject<NSTextFieldCell> textFieldCell_; | |
23 | |
24 scoped_nsobject<NSImage> cachedTabImage_; | |
25 // Cache the various button states when creating |cachedTabImage_|. If | |
26 // any of these states change then the cached image is invalidated. | |
27 BOOL cachedTabImageIsPressed_; | |
28 | |
29 // The popup menu and its model. | |
30 scoped_nsobject<MenuController> menu_; | |
31 scoped_ptr<ProfileMenuModel> profile_menu_model_; | |
32 } | |
33 | |
34 @property(assign,nonatomic) BOOL shouldShowProfileDisplayName; | |
35 @property(assign,nonatomic) NSString* profileDisplayName; | |
36 | |
37 // Gets the size of the control that would display all its contents. | |
38 - (NSSize)desiredControlSize; | |
39 // Gets the minimum size that the control should be resized to. | |
40 - (NSSize)minControlSize; | |
41 | |
42 @end | |
43 | |
44 #endif // CHROME_BROWSER_UI_COCOA_PROFILE_MENU_BUTTON_H_ | |
OLD | NEW |