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

Unified Diff: chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm

Issue 1515553006: Change password bubble for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase, clean-up Created 5 years 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/passwords/pending_password_view_controller.mm
diff --git a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
index e0bc8465d0d144d0b4a56ba0f32540088d41b6af..1b8edd2dd864b7524e40f09aa65c5f21f8530b03 100644
--- a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
@@ -134,7 +134,9 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64);
// Password item.
// It should be at least as wide as the box without the padding.
NSView* password = [self createPasswordView];
vasilii 2015/12/15 15:58:01 It's rather a password row, not just a password
dvadym 2015/12/16 14:16:31 Done.
- [view addSubview:password];
+ if (password) {
+ [view addSubview:password];
+ }
base::scoped_nsobject<NSTextField> warm_welcome;
if ([self shouldShowGoogleSmartLockWelcome]) {
@@ -176,11 +178,13 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64);
curY = NSMaxY([warm_welcome frame]) + kUnrelatedControlVerticalPadding;
}
+ if (password) {
// Password item goes on the next row.
vasilii 2015/12/15 15:58:01 indent
dvadym 2015/12/16 14:16:31 Done.
[password setFrameOrigin:NSMakePoint(curX, curY)];
// Title goes at the top after some padding.
curY = NSMaxY([password frame]) + kUnrelatedControlVerticalPadding;
+ }
[titleView setFrameOrigin:NSMakePoint(curX, curY)];
const CGFloat height = NSMaxY([titleView frame]) + kFramePadding;

Powered by Google App Engine
This is Rietveld 408576698