Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: chrome/browser/cocoa/extensions/browser_action_button.h

Issue 595017: [Mac] Use the ExtensionToolbarModel for ordering of the Browser Actions. Prep... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove redundant profile object. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ 5 #ifndef CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_
6 #define CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ 6 #define CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #import "base/scoped_nsobject.h" 10 #import "base/scoped_nsobject.h"
11 #include "base/scoped_ptr.h" 11 #include "base/scoped_ptr.h"
12 #include "chrome/browser/cocoa/toolbar_button_cell.h" 12 #include "chrome/browser/cocoa/toolbar_button_cell.h"
13 13
14 class Extension; 14 class Extension;
15 class ExtensionAction; 15 class ExtensionAction;
16 class ExtensionImageTrackerBridge; 16 class ExtensionImageTrackerBridge;
17 class Profile;
17 18
18 extern const CGFloat kBrowserActionWidth; 19 extern const CGFloat kBrowserActionWidth;
19 20
20 @interface BrowserActionButton : NSButton { 21 @interface BrowserActionButton : NSButton {
21 @private 22 @private
22 scoped_ptr<ExtensionImageTrackerBridge> imageLoadingBridge_; 23 scoped_ptr<ExtensionImageTrackerBridge> imageLoadingBridge_;
23 24
24 scoped_nsobject<NSImage> defaultIcon_; 25 scoped_nsobject<NSImage> defaultIcon_;
25 26
26 scoped_nsobject<NSImage> tabSpecificIcon_; 27 scoped_nsobject<NSImage> tabSpecificIcon_;
27 28
28 // The extension for this button. Weak. 29 // The extension for this button. Weak.
29 Extension* extension_; 30 Extension* extension_;
30 31
31 // The ID of the active tab. 32 // The ID of the active tab.
32 int tabId_; 33 int tabId_;
33 } 34 }
34 35
35 - (id)initWithExtension:(Extension*)extension 36 - (id)initWithExtension:(Extension*)extension
36 tabId:(int)tabId 37 profile:(Profile*)profile
37 xOffset:(int)xOffset; 38 tabId:(int)tabId;
38 39
39 - (void)setDefaultIcon:(NSImage*)image; 40 - (void)setDefaultIcon:(NSImage*)image;
40 41
41 - (void)setTabSpecificIcon:(NSImage*)image; 42 - (void)setTabSpecificIcon:(NSImage*)image;
42 43
43 - (void)updateState; 44 - (void)updateState;
44 45
45 @property(readwrite, nonatomic) int tabId; 46 @property(readwrite, nonatomic) int tabId;
46 @property(readonly, nonatomic) Extension* extension; 47 @property(readonly, nonatomic) Extension* extension;
47 48
48 @end 49 @end
49 50
50 @interface BrowserActionCell : ToolbarButtonCell { 51 @interface BrowserActionCell : ToolbarButtonCell {
51 @private 52 @private
52 // The current tab ID used when drawing the cell. 53 // The current tab ID used when drawing the cell.
53 int tabId_; 54 int tabId_;
54 55
55 // The action we're drawing the cell for. Weak. 56 // The action we're drawing the cell for. Weak.
56 ExtensionAction* extensionAction_; 57 ExtensionAction* extensionAction_;
57 } 58 }
58 59
59 @property(readwrite, nonatomic) int tabId; 60 @property(readwrite, nonatomic) int tabId;
60 @property(readwrite, nonatomic) ExtensionAction* extensionAction; 61 @property(readwrite, nonatomic) ExtensionAction* extensionAction;
61 62
62 @end 63 @end
63 64
64 #endif // CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ 65 #endif // CHROME_BROWSER_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698