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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm

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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm b/chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm
index 4b504bd5125e1e1331c6fda9818d04923ba874c1..12ec13d78336cf42720e1cd6ac2d32ebab32ab42 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm
@@ -6,12 +6,10 @@
#include "base/logging.h"
#include "base/mac/scoped_nsobject.h"
-#include "base/strings/sys_string_conversions.h"
#include "chrome/browser/ui/autofill/autofill_dialog_types.h"
#include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
#include "chrome/browser/ui/cocoa/autofill/autofill_dialog_constants.h"
#import "chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h"
-#include "skia/ext/skia_utils_mac.h"
@implementation AutofillNotificationContainer
@@ -75,32 +73,23 @@
// Create basic notification view.
const autofill::DialogNotification& notification = notifications[i];
base::scoped_nsobject<AutofillNotificationController>
- notificationController([[AutofillNotificationController alloc] init]);
- [notificationController setText:
- base::SysUTF16ToNSString(notification.display_text())];
- [notificationController setTextColor:
- gfx::SkColorToCalibratedNSColor(notification.GetTextColor())];
- [notificationController setBackgroundColor:
- gfx::SkColorToCalibratedNSColor(notification.GetBackgroundColor())];
-
- // Add optional checkbox.
+ notificationController([[AutofillNotificationController alloc]
+ initWithNotification:&notification]);
+
+ if (i == 0) {
+ [notificationController setHasArrow:notification.HasArrow()
+ withAnchorView:anchorView_];
+ }
+
if (notification.HasCheckbox()) {
// No more than one notification with a checkbox.
DCHECK(!checkboxNotification_);
checkboxNotification_.reset(
new autofill::DialogNotification(notification));
- [notificationController setHasCheckbox:YES];
- [[notificationController checkbox] setState:
- (notification.checked() ? NSOnState : NSOffState)];
[[notificationController checkbox] setTarget:self];
[[notificationController checkbox] setAction:@selector(checkboxClicked:)];
}
- if (i == 0) {
- [notificationController setHasArrow:notification.HasArrow()
- withAnchorView:anchorView_];
- }
-
[notificationControllers_ addObject:notificationController];
[[self view] addSubview:[notificationController view]];
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698