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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_controller.mm

Issue 1364113003: Only (and always) put URLs in NSLinkAttributeName. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobar1
Patch Set: stray deletion Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_contr oller.h" 5 #import "chrome/browser/ui/cocoa/profiles/profile_signin_confirmation_view_contr oller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 chrome_style::GetLinkColor()); 94 chrome_style::GetLinkColor());
95 NSMutableString* finalMessage = [NSMutableString stringWithString: 95 NSMutableString* finalMessage = [NSMutableString stringWithString:
96 base::SysUTF16ToNSString(message)]; 96 base::SysUTF16ToNSString(message)];
97 NSString* linkString = base::SysUTF16ToNSString(link); 97 NSString* linkString = base::SysUTF16ToNSString(link);
98 98
99 [finalMessage insertString:linkString atIndex:offset]; 99 [finalMessage insertString:linkString atIndex:offset];
100 [textView setMessage:finalMessage 100 [textView setMessage:finalMessage
101 withFont:font 101 withFont:font
102 messageColor:[NSColor blackColor]]; 102 messageColor:[NSColor blackColor]];
103 [textView addLinkRange:NSMakeRange(offset, [linkString length]) 103 [textView addLinkRange:NSMakeRange(offset, [linkString length])
104 withName:@"" 104 withURL:@"about:blank" // using a link here is bad ui
105 linkColor:linkColor]; 105 linkColor:linkColor];
106 RemoveUnderlining(textView, offset, link.size()); 106 RemoveUnderlining(textView, offset, link.size());
107 [textView setDelegate:delegate]; 107 [textView setDelegate:delegate];
108 [parent addSubview:textView]; 108 [parent addSubview:textView];
109 return textView.autorelease(); 109 return textView.autorelease();
110 } 110 }
111 111
112 // Create a new NSTextField and add it to the specified parent. 112 // Create a new NSTextField and add it to the specified parent.
113 NSTextField* AddTextField( 113 NSTextField* AddTextField(
114 NSView* parent, 114 NSView* parent,
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 - (NSButton*)createProfileButton { 443 - (NSButton*)createProfileButton {
444 return createProfileButton_.get(); 444 return createProfileButton_.get();
445 } 445 }
446 446
447 - (NSTextView*)explanationField { 447 - (NSTextView*)explanationField {
448 return explanationField_.get(); 448 return explanationField_.get();
449 } 449 }
450 450
451 @end 451 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698