| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/about_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/about_window_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
| 12 #include "chrome/browser/browser_list.h" | 12 #include "chrome/browser/browser_list.h" |
| 13 #include "chrome/browser/browser_window.h" | 13 #include "chrome/browser/browser_window.h" |
| 14 #import "chrome/browser/cocoa/keystone_glue.h" | 14 #import "chrome/browser/cocoa/keystone_glue.h" |
| 15 #include "chrome/browser/google/google_util.h" | 15 #include "chrome/browser/google/google_util.h" |
| 16 #include "chrome/browser/platform_util.h" | 16 #include "chrome/browser/platform_util.h" |
| 17 #import "chrome/browser/ui/cocoa/background_tile_view.h" | 17 #import "chrome/browser/ui/cocoa/background_tile_view.h" |
| 18 #include "chrome/browser/ui/cocoa/restart_browser.h" | 18 #include "chrome/browser/ui/cocoa/restart_browser.h" |
| 19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
| 20 #include "grit/chromium_strings.h" | 20 #include "grit/chromium_strings.h" |
| 21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
| 22 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
| 23 #include "grit/locale_settings.h" | 23 #include "grit/locale_settings.h" |
| 24 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 24 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
| 25 #include "ui/base/l10n/l10n_util.h" | 25 #include "ui/base/l10n/l10n_util.h" |
| 26 #include "ui/base/l10n/l10n_util_mac.h" | 26 #include "ui/base/l10n/l10n_util_mac.h" |
| 27 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
| 28 #include "ui/gfx/image.h" |
| 28 | 29 |
| 29 namespace { | 30 namespace { |
| 30 | 31 |
| 31 void AttributedStringAppendString(NSMutableAttributedString* attr_str, | 32 void AttributedStringAppendString(NSMutableAttributedString* attr_str, |
| 32 NSString* str) { | 33 NSString* str) { |
| 33 // You might think doing [[attr_str mutableString] appendString:str] would | 34 // You might think doing [[attr_str mutableString] appendString:str] would |
| 34 // work, but it causes any trailing style to get extened, meaning as we | 35 // work, but it causes any trailing style to get extened, meaning as we |
| 35 // append links, they grow to include the new text, not what we want. | 36 // append links, they grow to include the new text, not what we want. |
| 36 NSAttributedString* new_attr_str = | 37 NSAttributedString* new_attr_str = |
| 37 [[[NSAttributedString alloc] initWithString:str] autorelease]; | 38 [[[NSAttributedString alloc] initWithString:str] autorelease]; |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 NSRange string_range = NSMakeRange(0, [legal_block length]); | 756 NSRange string_range = NSMakeRange(0, [legal_block length]); |
| 756 [legal_block addAttribute:NSFontAttributeName | 757 [legal_block addAttribute:NSFontAttributeName |
| 757 value:[NSFont labelFontOfSize:11] | 758 value:[NSFont labelFontOfSize:11] |
| 758 range:string_range]; | 759 range:string_range]; |
| 759 | 760 |
| 760 [legal_block endEditing]; | 761 [legal_block endEditing]; |
| 761 return legal_block; | 762 return legal_block; |
| 762 } | 763 } |
| 763 | 764 |
| 764 @end // @implementation AboutWindowController | 765 @end // @implementation AboutWindowController |
| OLD | NEW |