| 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/memory/scoped_nsobject.h" | 10 #import "base/memory/scoped_nsobject.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #import "chrome/browser/ui/cocoa/gradient_button_cell.h" | 12 #import "chrome/browser/ui/cocoa/gradient_button_cell.h" |
| 13 | 13 |
| 14 class Browser; | 14 class Browser; |
| 15 class ExtensionAction; | 15 class ExtensionAction; |
| 16 class ExtensionImageTrackerBridge; | 16 class ExtensionActionIconFactoryBridge; |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 class Extension; | 19 class Extension; |
| 20 } | 20 } |
| 21 | 21 |
| 22 // Fired on each drag event while the user is moving the button. | 22 // Fired on each drag event while the user is moving the button. |
| 23 extern NSString* const kBrowserActionButtonDraggingNotification; | 23 extern NSString* const kBrowserActionButtonDraggingNotification; |
| 24 // Fired when the user drops the button. | 24 // Fired when the user drops the button. |
| 25 extern NSString* const kBrowserActionButtonDragEndNotification; | 25 extern NSString* const kBrowserActionButtonDragEndNotification; |
| 26 | 26 |
| 27 @interface BrowserActionButton : NSButton { | 27 @interface BrowserActionButton : NSButton { |
| 28 @private | 28 @private |
| 29 // Bridge to proxy Chrome notifications to the Obj-C class as well as load the | 29 // Bridge to proxy Chrome notifications to the Obj-C class as well as load the |
| 30 // extension's icon. | 30 // extension's icon. |
| 31 scoped_ptr<ExtensionImageTrackerBridge> imageLoadingBridge_; | 31 scoped_ptr<ExtensionActionIconFactoryBridge> iconFactoryBridge_; |
| 32 | 32 |
| 33 // Used to move the button and query whether a button is currently animating. | 33 // Used to move the button and query whether a button is currently animating. |
| 34 scoped_nsobject<NSViewAnimation> moveAnimation_; | 34 scoped_nsobject<NSViewAnimation> moveAnimation_; |
| 35 | 35 |
| 36 // The extension for this button. Weak. | 36 // The extension for this button. Weak. |
| 37 const extensions::Extension* extension_; | 37 const extensions::Extension* extension_; |
| 38 | 38 |
| 39 // The ID of the active tab. | 39 // The ID of the active tab. |
| 40 int tabId_; | 40 int tabId_; |
| 41 | 41 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // The action we're drawing the cell for. Weak. | 77 // The action we're drawing the cell for. Weak. |
| 78 ExtensionAction* extensionAction_; | 78 ExtensionAction* extensionAction_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 @property(readwrite, nonatomic) int tabId; | 81 @property(readwrite, nonatomic) int tabId; |
| 82 @property(readwrite, nonatomic) ExtensionAction* extensionAction; | 82 @property(readwrite, nonatomic) ExtensionAction* extensionAction; |
| 83 | 83 |
| 84 @end | 84 @end |
| 85 | 85 |
| 86 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ | 86 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ |
| OLD | NEW |