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

Issue 54303007: [rAc OSX] Add support for tooltips in notifications. (Closed)

Created:
7 years, 1 month ago by Ilya Sherman
Modified:
7 years, 1 month ago
Reviewers:
groby-ooo-7-16
CC:
chromium-reviews, benquan, Dane Wallinga, dyu1, estade+watch_chromium.org, rouslan+autofillwatch_chromium.org
Visibility:
Public.

Description

[rAc OSX] Add support for tooltips in notifications. BUG=286528 TEST=unit_tests R=groby@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232849

Patch Set 1 #

Patch Set 2 : Change designated initializer to -initWithNotification: #

Patch Set 3 : Update tests #

Total comments: 2

Patch Set 4 : Position tooltips during layout only when they're visible #

Patch Set 5 : Rebase #

Patch Set 6 : For now, comment out a DCHECK that fails with tests (need moar test rigging?) #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -71 lines) Patch
M chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm View 1 2 chunks +8 lines, -19 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_notification_controller.h View 1 3 chunks +11 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm View 1 2 3 4 5 5 chunks +58 lines, -41 lines 0 comments Download
M chrome/browser/ui/cocoa/autofill/autofill_notification_controller_unittest.mm View 1 2 3 chunks +70 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Ilya Sherman
7 years, 1 month ago (2013-11-01 06:48:33 UTC) #1
groby-ooo-7-16
LGTM w/ nit https://codereview.chromium.org/54303007/diff/100001/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm File chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm (right): https://codereview.chromium.org/54303007/diff/100001/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm#newcode178 chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm:178: NSPoint tooltipOrigin = Move into ![tooltipIcon ...
7 years, 1 month ago (2013-11-02 01:38:49 UTC) #2
Ilya Sherman
https://codereview.chromium.org/54303007/diff/100001/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm File chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm (right): https://codereview.chromium.org/54303007/diff/100001/chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm#newcode178 chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm:178: NSPoint tooltipOrigin = On 2013/11/02 01:38:50, groby wrote: > ...
7 years, 1 month ago (2013-11-02 01:42:27 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/54303007/140001
7 years, 1 month ago (2013-11-02 01:45:28 UTC) #4
commit-bot: I haz the power
Failed to apply patch for chrome/browser/ui/cocoa/autofill/autofill_notification_controller.mm: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 1 month ago (2013-11-02 01:45:34 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/54303007/190001
7 years, 1 month ago (2013-11-02 02:11:45 UTC) #6
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=183929
7 years, 1 month ago (2013-11-02 04:15:48 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/54303007/460001
7 years, 1 month ago (2013-11-04 07:24:57 UTC) #8
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=218385
7 years, 1 month ago (2013-11-04 09:51:50 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/54303007/460001
7 years, 1 month ago (2013-11-04 19:41:36 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=218792
7 years, 1 month ago (2013-11-04 23:22:09 UTC) #11
Ilya Sherman
Committed patchset #7 manually as r232849 (presubmit successful).
7 years, 1 month ago (2013-11-05 00:22:34 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/54303007/460001
7 years, 1 month ago (2013-11-05 00:24:09 UTC) #13
commit-bot: I haz the power
7 years, 1 month ago (2013-11-05 00:24:12 UTC) #14
Message was sent while issue was closed.
Failed to apply patch for
chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm:
While running patch -p1 --forward --force --no-backup-if-mismatch;
  patching file
chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm
  Hunk #1 FAILED at 6.
  Hunk #2 FAILED at 75.
  2 out of 2 hunks FAILED -- saving rejects to file
chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm.rej

Patch:       chrome/browser/ui/cocoa/autofill/autofill_notification_container.mm
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]];
   }

Powered by Google App Engine
This is Rietveld 408576698