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" |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 [promoteButton_ setEnabled:enablePromoteButton]; | 601 [promoteButton_ setEnabled:enablePromoteButton]; |
602 } | 602 } |
603 | 603 |
604 - (BOOL)textView:(NSTextView *)aTextView | 604 - (BOOL)textView:(NSTextView *)aTextView |
605 clickedOnLink:(id)link | 605 clickedOnLink:(id)link |
606 atIndex:(NSUInteger)charIndex { | 606 atIndex:(NSUInteger)charIndex { |
607 // We always create a new window, so there's no need to try to re-use | 607 // We always create a new window, so there's no need to try to re-use |
608 // an existing one just to pass in the NEW_WINDOW disposition. | 608 // an existing one just to pass in the NEW_WINDOW disposition. |
609 Browser* browser = Browser::Create(profile_); | 609 Browser* browser = Browser::Create(profile_); |
610 browser->OpenURL(GURL([link UTF8String]), GURL(), NEW_FOREGROUND_TAB, | 610 browser->OpenURL(GURL([link UTF8String]), GURL(), NEW_FOREGROUND_TAB, |
611 PageTransition::LINK); | 611 content::PAGE_TRANSITION_LINK); |
612 browser->window()->Show(); | 612 browser->window()->Show(); |
613 return YES; | 613 return YES; |
614 } | 614 } |
615 | 615 |
616 - (NSTextView*)legalText { | 616 - (NSTextView*)legalText { |
617 return legalText_; | 617 return legalText_; |
618 } | 618 } |
619 | 619 |
620 - (NSButton*)updateButton { | 620 - (NSButton*)updateButton { |
621 return updateNowButton_; | 621 return updateNowButton_; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 NSRange string_range = NSMakeRange(0, [legal_block length]); | 740 NSRange string_range = NSMakeRange(0, [legal_block length]); |
741 [legal_block addAttribute:NSFontAttributeName | 741 [legal_block addAttribute:NSFontAttributeName |
742 value:[NSFont labelFontOfSize:11] | 742 value:[NSFont labelFontOfSize:11] |
743 range:string_range]; | 743 range:string_range]; |
744 | 744 |
745 [legal_block endEditing]; | 745 [legal_block endEditing]; |
746 return legal_block; | 746 return legal_block; |
747 } | 747 } |
748 | 748 |
749 @end // @implementation AboutWindowController | 749 @end // @implementation AboutWindowController |
OLD | NEW |