| 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 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Returns the frame the button will occupy once animation is complete, or its | 80 // Returns the frame the button will occupy once animation is complete, or its |
| 81 // current frame if it is not animating. | 81 // current frame if it is not animating. |
| 82 - (NSRect)frameAfterAnimation; | 82 - (NSRect)frameAfterAnimation; |
| 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. |
| 91 - (void)showContextMenu; |
| 92 |
| 90 @property(readonly, nonatomic) BOOL isBeingDragged; | 93 @property(readonly, nonatomic) BOOL isBeingDragged; |
| 91 | 94 |
| 92 @end | 95 @end |
| 93 | 96 |
| 94 @interface BrowserActionButton(TestingAPI) | 97 @interface BrowserActionButton(TestingAPI) |
| 95 // Sets a context menu to use for testing purposes. | 98 // Sets a context menu to use for testing purposes. |
| 96 - (void)setTestContextMenu:(NSMenu*)testContextMenu; | 99 - (void)setTestContextMenu:(NSMenu*)testContextMenu; |
| 97 // Returns true if the action wants to run. | 100 // Returns true if the action wants to run. |
| 98 - (BOOL)wantsToRunForTesting; | 101 - (BOOL)wantsToRunForTesting; |
| 99 @end | 102 @end |
| 100 | 103 |
| 101 @interface BrowserActionCell : ImageButtonCell { | 104 @interface BrowserActionCell : ImageButtonCell { |
| 102 @private | 105 @private |
| 103 // The controller for the browser actions bar that owns the button. Weak. | 106 // The controller for the browser actions bar that owns the button. Weak. |
| 104 BrowserActionsController* browserActionsController_; | 107 BrowserActionsController* browserActionsController_; |
| 105 } | 108 } |
| 106 | 109 |
| 107 @property(assign, nonatomic) | 110 @property(assign, nonatomic) |
| 108 BrowserActionsController* browserActionsController; | 111 BrowserActionsController* browserActionsController; |
| 109 | 112 |
| 110 @end | 113 @end |
| 111 | 114 |
| 112 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ | 115 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ |
| OLD | NEW |