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

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

Issue 1610653002: Integrate the account chooser dialog on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 11 months 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 4b39b62964db961cd3e66d96f6d2601d0162cb0f..588462ac4e3a36c275f01e42eb690b5e82118949 100644
--- a/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
+++ b/chrome/browser/ui/cocoa/passwords/pending_password_view_controller.mm
@@ -90,35 +90,8 @@ const SkColor kWarmWelcomeColor = SkColorSetRGB(0x64, 0x64, 0x64);
[view addSubview:closeButton_];
// Title.
- base::scoped_nsobject<HyperlinkTextView> titleView(
- [[HyperlinkTextView alloc] initWithFrame:NSZeroRect]);
- NSColor* textColor = [NSColor blackColor];
- NSFont* font = ResourceBundle::GetSharedInstance()
- .GetFontList(ResourceBundle::SmallFont)
- .GetPrimaryFont()
- .GetNativeFont();
- [titleView setMessage:base::SysUTF16ToNSString(model_->title())
- withFont:font
- messageColor:textColor];
- NSRange titleBrandLinkRange = model_->title_brand_link_range().ToNSRange();
- if (titleBrandLinkRange.length) {
- NSColor* linkColor =
- skia::SkColorToCalibratedNSColor(chrome_style::GetLinkColor());
- [titleView addLinkRange:titleBrandLinkRange
- withURL:nil
- linkColor:linkColor];
- [titleView.get() setDelegate:self];
-
- // Create the link with no underlining.
- [titleView setLinkTextAttributes:nil];
- NSTextStorage* text = [titleView textStorage];
- [text addAttribute:NSUnderlineStyleAttributeName
- value:@(NSUnderlineStyleNone)
- range:titleBrandLinkRange];
- } else {
- // TODO(vasilii): remove if crbug.com/515189 is fixed.
- [titleView setRefusesFirstResponder:YES];
- }
+ HyperlinkTextView* titleView = TitleLabelWithLink(
+ model_->title(), model_->title_brand_link_range(), self);
// Force the text to wrap to fit in the bubble size.
int titleRightPadding =

Powered by Google App Engine
This is Rietveld 408576698