| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |