| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/app_list/cocoa/app_list_view_controller.h" | 5 #import "ui/app_list/cocoa/app_list_view_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 attributes:defaultAttributes]); | 281 attributes:defaultAttributes]); |
| 282 base::scoped_nsobject<NSAttributedString> messagePreString( | 282 base::scoped_nsobject<NSAttributedString> messagePreString( |
| 283 [[NSAttributedString alloc] | 283 [[NSAttributedString alloc] |
| 284 initWithString:base::SysUTF16ToNSString(messagePre) | 284 initWithString:base::SysUTF16ToNSString(messagePre) |
| 285 attributes:defaultAttributes]); | 285 attributes:defaultAttributes]); |
| 286 base::scoped_nsobject<NSAttributedString> messagePostString( | 286 base::scoped_nsobject<NSAttributedString> messagePostString( |
| 287 [[NSAttributedString alloc] | 287 [[NSAttributedString alloc] |
| 288 initWithString:base::SysUTF16ToNSString(messagePost) | 288 initWithString:base::SysUTF16ToNSString(messagePost) |
| 289 attributes:defaultAttributes]); | 289 attributes:defaultAttributes]); |
| 290 | 290 |
| 291 // NSNoUnderlineStyle is broken. | 291 // NSUnderlineStyleNone is broken. |
| 292 base::scoped_nsobject<NSAttributedString> learnMoreString( | 292 base::scoped_nsobject<NSAttributedString> learnMoreString( |
| 293 [[NSAttributedString alloc] | 293 [[NSAttributedString alloc] |
| 294 initWithString:base::SysUTF16ToNSString(learnMore) | 294 initWithString:base::SysUTF16ToNSString(learnMore) |
| 295 attributes:@{ | 295 attributes:@{ |
| 296 NSParagraphStyleAttributeName : paragraphStyle, | 296 NSParagraphStyleAttributeName : paragraphStyle, |
| 297 NSFontAttributeName : messageFont, | 297 NSFontAttributeName : messageFont, |
| 298 NSLinkAttributeName : linkURL, | 298 NSLinkAttributeName : linkURL, |
| 299 NSBaselineOffsetAttributeName : baselineOffset, | 299 NSBaselineOffsetAttributeName : baselineOffset, |
| 300 NSUnderlineStyleAttributeName : | 300 NSUnderlineStyleAttributeName : |
| 301 [NSNumber numberWithInt:NSNoUnderlineStyle] | 301 [NSNumber numberWithInt:NSUnderlineStyleNone] |
| 302 }]); | 302 }]); |
| 303 base::scoped_nsobject<NSAttributedString> shortcutStringText( | 303 base::scoped_nsobject<NSAttributedString> shortcutStringText( |
| 304 [[NSAttributedString alloc] | 304 [[NSAttributedString alloc] |
| 305 initWithString:base::SysUTF16ToNSString(shortcutName) | 305 initWithString:base::SysUTF16ToNSString(shortcutName) |
| 306 attributes:defaultAttributes]); | 306 attributes:defaultAttributes]); |
| 307 base::scoped_nsobject<NSMutableAttributedString> shortcutString( | 307 base::scoped_nsobject<NSMutableAttributedString> shortcutString( |
| 308 [[NSMutableAttributedString alloc] init]); | 308 [[NSMutableAttributedString alloc] init]); |
| 309 if (icon) { | 309 if (icon) { |
| 310 NSImage* image = gfx::NSImageFromImageSkia(*icon); | 310 NSImage* image = gfx::NSImageFromImageSkia(*icon); |
| 311 // The image has a bunch of representations. Ensure the smallest is used. | 311 // The image has a bunch of representations. Ensure the smallest is used. |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 return YES; | 599 return YES; |
| 600 } | 600 } |
| 601 | 601 |
| 602 - (NSArray*)textView:(NSTextView*)aTextView | 602 - (NSArray*)textView:(NSTextView*)aTextView |
| 603 willChangeSelectionFromCharacterRanges:(NSArray*)oldSelectedCharRanges | 603 willChangeSelectionFromCharacterRanges:(NSArray*)oldSelectedCharRanges |
| 604 toCharacterRanges:(NSArray*)newSelectedCharRanges { | 604 toCharacterRanges:(NSArray*)newSelectedCharRanges { |
| 605 return oldSelectedCharRanges; | 605 return oldSelectedCharRanges; |
| 606 } | 606 } |
| 607 | 607 |
| 608 @end | 608 @end |
| OLD | NEW |