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

Side by Side Diff: chrome/browser/cocoa/delayedmenu_button.h

Issue 2973004: [Mac]Implement ViewID support. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Turns out that, it's not a good solution. Created 10 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/cocoa/button_with_viewid.mm ('k') | chrome/browser/cocoa/download_shelf_view.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COCOA_DELAYEDMENU_BUTTON_H_ 5 #ifndef CHROME_BROWSER_COCOA_DELAYEDMENU_BUTTON_H_
6 #define CHROME_BROWSER_COCOA_DELAYEDMENU_BUTTON_H_ 6 #define CHROME_BROWSER_COCOA_DELAYEDMENU_BUTTON_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/scoped_nsobject.h" 10 #include "base/scoped_nsobject.h"
11 #import "chrome/browser/cocoa/button_with_viewid.h"
11 12
12 @interface DelayedMenuButton : NSButton { 13 @interface DelayedMenuButton : ButtonWithViewID {
13 NSMenu* attachedMenu_; // Strong (retained). 14 NSMenu* attachedMenu_; // Strong (retained).
14 BOOL attachedMenuEnabled_; 15 BOOL attachedMenuEnabled_;
15 scoped_nsobject<NSPopUpButtonCell> popUpCell_; 16 scoped_nsobject<NSPopUpButtonCell> popUpCell_;
16 } 17 }
17 18
18 // The menu to display. Note that it should have no (i.e., a blank) title and 19 // The menu to display. Note that it should have no (i.e., a blank) title and
19 // that the 0-th entry should be blank (and won't be displayed). (This is 20 // that the 0-th entry should be blank (and won't be displayed). (This is
20 // because we use a pulldown list, for which Cocoa uses the 0-th item as "title" 21 // because we use a pulldown list, for which Cocoa uses the 0-th item as "title"
21 // in the button. This might change if we ever switch to a pop-up. Our direct 22 // in the button. This might change if we ever switch to a pop-up. Our direct
22 // use of the given NSMenu object means that the one can set and use NSMenu's 23 // use of the given NSMenu object means that the one can set and use NSMenu's
23 // delegate as usual.) 24 // delegate as usual.)
24 @property(retain, nonatomic) NSMenu* attachedMenu; 25 @property(retain, nonatomic) NSMenu* attachedMenu;
25 26
26 // Is the menu enabled? (If not, don't act like a click-hold button.) 27 // Is the menu enabled? (If not, don't act like a click-hold button.)
27 @property(assign, nonatomic) BOOL attachedMenuEnabled; 28 @property(assign, nonatomic) BOOL attachedMenuEnabled;
28 29
29 @end // @interface DelayedMenuButton 30 @end // @interface DelayedMenuButton
30 31
31 #endif // CHROME_BROWSER_COCOA_DELAYEDMENU_BUTTON_H_ 32 #endif // CHROME_BROWSER_COCOA_DELAYEDMENU_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/button_with_viewid.mm ('k') | chrome/browser/cocoa/download_shelf_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698