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

Side by Side Diff: chrome/browser/ui/cocoa/exclusive_access_bubble_window_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/logging.h" // for NOTREACHED() 7 #include "base/logging.h" // for NOTREACHED()
8 #include "base/mac/bundle_locations.h" 8 #include "base/mac/bundle_locations.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 237 }
238 238
239 NSFont* font = [NSFont 239 NSFont* font = [NSFont
240 systemFontOfSize:[NSFont 240 systemFontOfSize:[NSFont
241 systemFontSizeForControlSize:NSRegularControlSize]]; 241 systemFontSizeForControlSize:NSRegularControlSize]];
242 [exitLabel_.get() setMessage:exitLinkedText 242 [exitLabel_.get() setMessage:exitLinkedText
243 withFont:font 243 withFont:font
244 messageColor:[NSColor blackColor]]; 244 messageColor:[NSColor blackColor]];
245 if ([exitLinkText length] != 0) { 245 if ([exitLinkText length] != 0) {
246 [exitLabel_.get() addLinkRange:NSMakeRange(0, [exitLinkText length]) 246 [exitLabel_.get() addLinkRange:NSMakeRange(0, [exitLinkText length])
247 withName:@"" 247 withURL:@"about:blank" // using link here is bad ui
248 linkColor:[NSColor blueColor]]; 248 linkColor:[NSColor blueColor]];
249 } 249 }
250 [exitLabel_.get() setAlignment:NSRightTextAlignment]; 250 [exitLabel_.get() setAlignment:NSRightTextAlignment];
251 251
252 NSRect labelFrame = [exitLabel_ frame]; 252 NSRect labelFrame = [exitLabel_ frame];
253 253
254 // NSTextView's sizeToFit: method seems to enjoy wrapping lines. Temporarily 254 // NSTextView's sizeToFit: method seems to enjoy wrapping lines. Temporarily
255 // set the size large to force it not to. 255 // set the size large to force it not to.
256 NSRect windowFrame = [[self window] frame]; 256 NSRect windowFrame = [[self window] frame];
257 [exitLabel_ setFrameSize:windowFrame.size]; 257 [exitLabel_ setFrameSize:windowFrame.size];
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 - (void)hideSoon { 343 - (void)hideSoon {
344 hideTimer_.reset( 344 hideTimer_.reset(
345 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay 345 [[NSTimer scheduledTimerWithTimeInterval:kInitialDelay
346 target:self 346 target:self
347 selector:@selector(hideTimerFired:) 347 selector:@selector(hideTimerFired:)
348 userInfo:nil 348 userInfo:nil
349 repeats:NO] retain]); 349 repeats:NO] retain]);
350 } 350 }
351 351
352 @end 352 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698