| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // menu will only be opened when clicked and held. | 42 // menu will only be opened when clicked and held. |
| 43 @property(assign, nonatomic) BOOL openMenuOnClick; | 43 @property(assign, nonatomic) BOOL openMenuOnClick; |
| 44 | 44 |
| 45 // Whether or not to open the menu when the right button is clicked. | 45 // Whether or not to open the menu when the right button is clicked. |
| 46 @property(assign, nonatomic) BOOL openMenuOnRightClick; | 46 @property(assign, nonatomic) BOOL openMenuOnRightClick; |
| 47 | 47 |
| 48 // Returns the rectangle that menus are anchored at. Can be overridden by | 48 // Returns the rectangle that menus are anchored at. Can be overridden by |
| 49 // subclasses, returns -bounds by default. | 49 // subclasses, returns -bounds by default. |
| 50 - (NSRect)menuRect; | 50 - (NSRect)menuRect; |
| 51 | 51 |
| 52 // Called when the menu is about to be shown. Implemented by subclasses. |
| 53 - (void)willShowMenu; |
| 54 |
| 52 @end // @interface MenuButton | 55 @end // @interface MenuButton |
| 53 | 56 |
| 54 // Available for subclasses. | 57 // Available for subclasses. |
| 55 @interface MenuButton (Protected) | 58 @interface MenuButton (Protected) |
| 56 - (void)configureCell; | 59 - (void)configureCell; |
| 57 @end | 60 @end |
| 58 | 61 |
| 59 #endif // CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ | 62 #endif // CHROME_BROWSER_UI_COCOA_MENU_BUTTON_H_ |
| OLD | NEW |