| 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_chooser_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> // kVK_Return. | 7 #import <Carbon/Carbon.h> // kVK_Return. |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 chrome_style::GetLinkColor()); | 168 chrome_style::GetLinkColor()); |
| 169 NSMutableString* finalMessage = | 169 NSMutableString* finalMessage = |
| 170 [NSMutableString stringWithFormat:@"%@\n", message]; | 170 [NSMutableString stringWithFormat:@"%@\n", message]; |
| 171 [finalMessage insertString:link atIndex:link_offset]; | 171 [finalMessage insertString:link atIndex:link_offset]; |
| 172 // Adds a padding row at the bottom, because |boundingRectWithSize| below cuts | 172 // Adds a padding row at the bottom, because |boundingRectWithSize| below cuts |
| 173 // off the last row sometimes. | 173 // off the last row sometimes. |
| 174 [text_view setMessage:finalMessage | 174 [text_view setMessage:finalMessage |
| 175 withFont:[NSFont labelFontOfSize:kTextFontSize] | 175 withFont:[NSFont labelFontOfSize:kTextFontSize] |
| 176 messageColor:[NSColor blackColor]]; | 176 messageColor:[NSColor blackColor]]; |
| 177 [text_view addLinkRange:NSMakeRange(link_offset, [link length]) | 177 [text_view addLinkRange:NSMakeRange(link_offset, [link length]) |
| 178 withName:@"" | 178 withURL:@"about:blank" // using a link here is bad ui |
| 179 linkColor:link_color]; | 179 linkColor:link_color]; |
| 180 | 180 |
| 181 // Removes the underlining from the link. | 181 // Removes the underlining from the link. |
| 182 [text_view setLinkTextAttributes:nil]; | 182 [text_view setLinkTextAttributes:nil]; |
| 183 NSTextStorage* text_storage = [text_view textStorage]; | 183 NSTextStorage* text_storage = [text_view textStorage]; |
| 184 NSRange link_range = NSMakeRange(link_offset, [link length]); | 184 NSRange link_range = NSMakeRange(link_offset, [link length]); |
| 185 [text_storage addAttribute:NSUnderlineStyleAttributeName | 185 [text_storage addAttribute:NSUnderlineStyleAttributeName |
| 186 value:[NSNumber numberWithInt:NSUnderlineStyleNone] | 186 value:[NSNumber numberWithInt:NSUnderlineStyleNone] |
| 187 range:link_range]; | 187 range:link_range]; |
| 188 | 188 |
| (...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2397 } | 2397 } |
| 2398 | 2398 |
| 2399 - (bool)shouldShowGoIncognito { | 2399 - (bool)shouldShowGoIncognito { |
| 2400 bool incognitoAvailable = | 2400 bool incognitoAvailable = |
| 2401 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 2401 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 2402 IncognitoModePrefs::DISABLED; | 2402 IncognitoModePrefs::DISABLED; |
| 2403 return incognitoAvailable && !browser_->profile()->IsGuestSession(); | 2403 return incognitoAvailable && !browser_->profile()->IsGuestSession(); |
| 2404 } | 2404 } |
| 2405 | 2405 |
| 2406 @end | 2406 @end |
| OLD | NEW |