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

Unified Diff: chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm

Issue 887823002: Finished swap out of old API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed formatting issues, changed code to perform string operations in C++ rather than ObjC Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
diff --git a/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm b/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
index 30d1e79d32b685c2be0f8ca8062811547afec0a6..c8873ed152a664af93c1afa239b167de4d423c6a 100644
--- a/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobars/alternate_nav_infobar_controller.mm
@@ -30,15 +30,16 @@
size_t offset = base::string16::npos;
base::string16 message = delegate->GetMessageTextWithOffset(&offset);
base::string16 link = delegate->GetLinkText();
+ message.insert(offset, link);
NSFont* font = [NSFont labelFontOfSize:
[NSFont systemFontSizeForControlSize:NSRegularControlSize]];
HyperlinkTextView* view = (HyperlinkTextView*)label_.get();
- [view setMessageAndLink:base::SysUTF16ToNSString(message)
- withLink:base::SysUTF16ToNSString(link)
- atOffset:offset
- font:font
- messageColor:[NSColor blackColor]
- linkColor:[NSColor blueColor]];
+ [view setMessage:base::SysUTF16ToNSString(message)
+ withFont:font
+ messageColor:[NSColor blackColor]];
+ [view addLinkRange:NSMakeRange(offset, link.length())
+ withName:@""
+ linkColor:[NSColor blueColor]];
}
// Called when someone clicks on the link in the infobar. This method
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/infobars/confirm_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698