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

Side by Side Diff: chrome/browser/ui/cocoa/menu_controller.h

Issue 6258017: Mac: Never have a space between @property and ( (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: comments Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_UI_COCOA_MENU_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_MENU_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_MENU_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_MENU_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
(...skipping 10 matching lines...) Expand all
21 // allow for hierarchical menus). The tag is the index into that model for 21 // allow for hierarchical menus). The tag is the index into that model for
22 // that particular item. It is important that the model outlives this object 22 // that particular item. It is important that the model outlives this object
23 // as it only maintains weak references. 23 // as it only maintains weak references.
24 @interface MenuController : NSObject<NSMenuDelegate> { 24 @interface MenuController : NSObject<NSMenuDelegate> {
25 @protected 25 @protected
26 ui::MenuModel* model_; // weak 26 ui::MenuModel* model_; // weak
27 scoped_nsobject<NSMenu> menu_; 27 scoped_nsobject<NSMenu> menu_;
28 BOOL useWithPopUpButtonCell_; // If YES, 0th item is blank 28 BOOL useWithPopUpButtonCell_; // If YES, 0th item is blank
29 } 29 }
30 30
31 @property (nonatomic, assign) ui::MenuModel* model; 31 @property(nonatomic, assign) ui::MenuModel* model;
32 // Note that changing this will have no effect if you use 32 // Note that changing this will have no effect if you use
33 // |-initWithModel:useWithPopUpButtonCell:| or after the first call to |-menu|. 33 // |-initWithModel:useWithPopUpButtonCell:| or after the first call to |-menu|.
34 @property (nonatomic) BOOL useWithPopUpButtonCell; 34 @property(nonatomic) BOOL useWithPopUpButtonCell;
35 35
36 // NIB-based initializer. This does not create a menu. Clients can set the 36 // NIB-based initializer. This does not create a menu. Clients can set the
37 // properties of the object and the menu will be created upon the first call to 37 // properties of the object and the menu will be created upon the first call to
38 // |-menu|. Note that the menu will be immutable after creation. 38 // |-menu|. Note that the menu will be immutable after creation.
39 - (id)init; 39 - (id)init;
40 40
41 // Builds a NSMenu from the pre-built model (must not be nil). Changes made 41 // Builds a NSMenu from the pre-built model (must not be nil). Changes made
42 // to the contents of the model after calling this will not be noticed. If 42 // to the contents of the model after calling this will not be noticed. If
43 // the menu will be displayed by a NSPopUpButtonCell, it needs to be of a 43 // the menu will be displayed by a NSPopUpButtonCell, it needs to be of a
44 // slightly different form (0th item is empty). Note this attribute of the menu 44 // slightly different form (0th item is empty). Note this attribute of the menu
(...skipping 14 matching lines...) Expand all
59 59
60 // Protected methods that subclassers can override. 60 // Protected methods that subclassers can override.
61 @interface MenuController (Protected) 61 @interface MenuController (Protected)
62 - (void)addItemToMenu:(NSMenu*)menu 62 - (void)addItemToMenu:(NSMenu*)menu
63 atIndex:(NSInteger)index 63 atIndex:(NSInteger)index
64 fromModel:(ui::MenuModel*)model 64 fromModel:(ui::MenuModel*)model
65 modelIndex:(int)modelIndex; 65 modelIndex:(int)modelIndex;
66 @end 66 @end
67 67
68 #endif // CHROME_BROWSER_UI_COCOA_MENU_CONTROLLER_H_ 68 #endif // CHROME_BROWSER_UI_COCOA_MENU_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/menu_button.h ('k') | chrome/browser/ui/cocoa/options/cookies_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698