OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 - (ToolbarActionViewController*)viewController; | 84 - (ToolbarActionViewController*)viewController; |
85 | 85 |
86 // Returns a pointer to an autoreleased NSImage with the badge, shadow and | 86 // Returns a pointer to an autoreleased NSImage with the badge, shadow and |
87 // cell image drawn into it. | 87 // cell image drawn into it. |
88 - (NSImage*)compositedImage; | 88 - (NSImage*)compositedImage; |
89 | 89 |
90 // Shows the context menu for the action. | 90 // Shows the context menu for the action. |
91 - (void)showContextMenu; | 91 - (void)showContextMenu; |
92 | 92 |
| 93 // Hides the button's context menu, if it's visible. |
| 94 - (void)hidePopup; |
| 95 |
93 @property(readonly, nonatomic) BOOL isBeingDragged; | 96 @property(readonly, nonatomic) BOOL isBeingDragged; |
94 | 97 |
95 @end | 98 @end |
96 | 99 |
97 @interface BrowserActionButton(TestingAPI) | 100 @interface BrowserActionButton(TestingAPI) |
98 // Sets a context menu to use for testing purposes. | 101 // Sets a context menu to use for testing purposes. |
99 - (void)setTestContextMenu:(NSMenu*)testContextMenu; | 102 - (void)setTestContextMenu:(NSMenu*)testContextMenu; |
100 // Returns true if the action wants to run. | 103 // Returns true if the action wants to run. |
101 - (BOOL)wantsToRunForTesting; | 104 - (BOOL)wantsToRunForTesting; |
102 // Returns true if the cell is highlighted. | 105 // Returns true if the cell is highlighted. |
103 - (BOOL)isHighlighted; | 106 - (BOOL)isHighlighted; |
104 @end | 107 @end |
105 | 108 |
106 @interface BrowserActionCell : ImageButtonCell { | 109 @interface BrowserActionCell : ImageButtonCell { |
107 @private | 110 @private |
108 // The controller for the browser actions bar that owns the button. Weak. | 111 // The controller for the browser actions bar that owns the button. Weak. |
109 BrowserActionsController* browserActionsController_; | 112 BrowserActionsController* browserActionsController_; |
110 } | 113 } |
111 | 114 |
112 @property(assign, nonatomic) | 115 @property(assign, nonatomic) |
113 BrowserActionsController* browserActionsController; | 116 BrowserActionsController* browserActionsController; |
114 | 117 |
115 @end | 118 @end |
116 | 119 |
117 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ | 120 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ |
OLD | NEW |