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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h

Issue 54303007: [rAc OSX] Add support for tooltips in notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h b/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h
index 171c452740a0ac0e3e5781b0620391311a9dd747..a6f311a75ddcc6b9d613e6981470c89dd95ea40b 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h
+++ b/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h
@@ -10,6 +10,10 @@
#include "base/mac/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_layout.h"
+namespace autofill {
+class DialogNotification;
+}
+
// Contains a single notification for requestAutocomplete dialog.
@interface AutofillNotificationController : NSViewController<AutofillLayout> {
@private
@@ -18,16 +22,18 @@
// Optional checkbox.
base::scoped_nsobject<NSButton> checkbox_;
+
+ // Optional tooltip icon.
+ base::scoped_nsobject<NSImageView> tooltipIcon_;
}
@property(nonatomic, readonly) NSTextField* textfield;
@property(nonatomic, readonly) NSButton* checkbox;
-@property(nonatomic, retain) NSColor* backgroundColor;
-@property(nonatomic, retain) NSColor* textColor;
-@property(nonatomic, copy) NSString* text; // Label text.
+@property(nonatomic, readonly) NSImageView* tooltipIcon;
-// Designated initializer.
-- (id)init;
+// Designated initializer. Initializes the controller as specified by
+// |notification|.
+- (id)initWithNotification:(const autofill::DialogNotification*)notification;
// Displays arrow on top of notification if set to YES. |anchorView| determines
// the arrow position - the tip of the arrow is centered on the horizontal
@@ -37,9 +43,6 @@
// Indicates if the controller draws an arrow.
- (BOOL)hasArrow;
-// Enables the optional checkbox.
-- (void)setHasCheckbox:(BOOL)hasCheckbox;
-
// Compute preferred size for given width.
- (NSSize)preferredSizeForWidth:(CGFloat)width;

Powered by Google App Engine
This is Rietveld 408576698