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

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

Issue 10797054: Use NSMenuDelegate for browser action overflow menu to update it upon opening. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 ExtensionImageTrackerBridge;
17 17
18 namespace extensions { 18 namespace extensions {
19 class Extension; 19 class Extension;
20 } 20 }
21 21
22 // Fired when the Browser Action's state has changed. Usually the image needs to
23 // be updated.
24 extern NSString* const kBrowserActionButtonUpdatedNotification;
25
26 // 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.
27 extern NSString* const kBrowserActionButtonDraggingNotification; 23 extern NSString* const kBrowserActionButtonDraggingNotification;
28 // Fired when the user drops the button. 24 // Fired when the user drops the button.
29 extern NSString* const kBrowserActionButtonDragEndNotification; 25 extern NSString* const kBrowserActionButtonDragEndNotification;
30 26
31 @interface BrowserActionButton : NSButton { 27 @interface BrowserActionButton : NSButton {
32 @private 28 @private
33 // 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
34 // extension's icon. 30 // extension's icon.
35 scoped_ptr<ExtensionImageTrackerBridge> imageLoadingBridge_; 31 scoped_ptr<ExtensionImageTrackerBridge> imageLoadingBridge_;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // The action we're drawing the cell for. Weak. 87 // The action we're drawing the cell for. Weak.
92 ExtensionAction* extensionAction_; 88 ExtensionAction* extensionAction_;
93 } 89 }
94 90
95 @property(readwrite, nonatomic) int tabId; 91 @property(readwrite, nonatomic) int tabId;
96 @property(readwrite, nonatomic) ExtensionAction* extensionAction; 92 @property(readwrite, nonatomic) ExtensionAction* extensionAction;
97 93
98 @end 94 @end
99 95
100 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_ 96 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_BROWSER_ACTION_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698