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

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: Tiny comment update 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..088d6cb12698260ba236ec2ec293d5f3d17ae46c 100644
--- a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
@@ -133,8 +133,10 @@ 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];
- [view addSubview:password];
+ NSView* passwordRow = [self createPasswordView];
+ if (passwordRow) {
+ [view addSubview:passwordRow];
+ }
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;
}
- // Password item goes on the next row.
- [password setFrameOrigin:NSMakePoint(curX, curY)];
+ if (passwordRow) {
+ // Password item goes on the next row.
+ [passwordRow setFrameOrigin:NSMakePoint(curX, curY)];
- // Title goes at the top after some padding.
- curY = NSMaxY([password frame]) + kUnrelatedControlVerticalPadding;
+ // Title goes at the top after some padding.
+ curY = NSMaxY([passwordRow frame]) + kUnrelatedControlVerticalPadding;
+ }
[titleView setFrameOrigin:NSMakePoint(curX, curY)];
const CGFloat height = NSMaxY([titleView frame]) + kFramePadding;

Powered by Google App Engine
This is Rietveld 408576698