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/mac/scoped_nsobject.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #import "chrome/browser/ui/cocoa/image_button_cell.h" | 12 #import "chrome/browser/ui/cocoa/image_button_cell.h" |
13 | 13 |
14 class Browser; | 14 class Browser; |
15 class ExtensionAction; | 15 class ExtensionAction; |
16 class ExtensionActionIconFactoryBridge; | 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<ExtensionActionIconFactoryBridge> iconFactoryBridge_; | 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 base::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 |
42 // Whether the button is currently being dragged. | 42 // Whether the button is currently being dragged. |
43 BOOL isBeingDragged_; | 43 BOOL isBeingDragged_; |
44 | 44 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // The action we're drawing the cell for. Weak. | 81 // The action we're drawing the cell for. Weak. |
82 ExtensionAction* extensionAction_; | 82 ExtensionAction* extensionAction_; |
83 } | 83 } |
84 | 84 |
85 @property(readwrite, nonatomic) int tabId; | 85 @property(readwrite, nonatomic) int tabId; |
86 @property(readwrite, nonatomic) ExtensionAction* extensionAction; | 86 @property(readwrite, nonatomic) ExtensionAction* extensionAction; |
87 | 87 |
88 @end | 88 @end |
89 | 89 |
90 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ | 90 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ |
OLD | NEW |