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

Side by Side Diff: chrome/browser/cocoa/about_window_controller.mm

Issue 3798001: Merge 62408 - Fixes bugs in usage of adding a new tab with a disposition of... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/src/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/cocoa/preferences_window_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/about_window_controller.h" 5 #import "chrome/browser/cocoa/about_window_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_mac.h" 8 #include "app/l10n_util_mac.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/mac_util.h" 11 #include "base/mac_util.h"
12 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "chrome/browser/browser_list.h" 15 #include "chrome/browser/browser_list.h"
16 #include "chrome/browser/browser_window.h"
16 #include "chrome/browser/platform_util.h" 17 #include "chrome/browser/platform_util.h"
17 #import "chrome/browser/cocoa/background_tile_view.h" 18 #import "chrome/browser/cocoa/background_tile_view.h"
18 #import "chrome/browser/cocoa/keystone_glue.h" 19 #import "chrome/browser/cocoa/keystone_glue.h"
19 #include "chrome/browser/cocoa/restart_browser.h" 20 #include "chrome/browser/cocoa/restart_browser.h"
20 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
21 #include "grit/chromium_strings.h" 22 #include "grit/chromium_strings.h"
22 #include "grit/generated_resources.h" 23 #include "grit/generated_resources.h"
23 #include "grit/theme_resources.h" 24 #include "grit/theme_resources.h"
24 #include "grit/locale_settings.h" 25 #include "grit/locale_settings.h"
25 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" 26 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 [updateNowButton_ setEnabled:enableUpdateButton]; 614 [updateNowButton_ setEnabled:enableUpdateButton];
614 [promoteButton_ setEnabled:enablePromoteButton]; 615 [promoteButton_ setEnabled:enablePromoteButton];
615 } 616 }
616 617
617 - (BOOL)textView:(NSTextView *)aTextView 618 - (BOOL)textView:(NSTextView *)aTextView
618 clickedOnLink:(id)link 619 clickedOnLink:(id)link
619 atIndex:(NSUInteger)charIndex { 620 atIndex:(NSUInteger)charIndex {
620 // We always create a new window, so there's no need to try to re-use 621 // We always create a new window, so there's no need to try to re-use
621 // an existing one just to pass in the NEW_WINDOW disposition. 622 // an existing one just to pass in the NEW_WINDOW disposition.
622 Browser* browser = Browser::Create(profile_); 623 Browser* browser = Browser::Create(profile_);
623 if (browser) { 624 browser->OpenURL(GURL([link UTF8String]), GURL(), NEW_FOREGROUND_TAB,
624 browser->OpenURL(GURL([link UTF8String]), GURL(), NEW_WINDOW, 625 PageTransition::LINK);
625 PageTransition::LINK); 626 browser->window()->Show();
626 }
627 return YES; 627 return YES;
628 } 628 }
629 629
630 - (NSTextView*)legalText { 630 - (NSTextView*)legalText {
631 return legalText_; 631 return legalText_;
632 } 632 }
633 633
634 - (NSButton*)updateButton { 634 - (NSButton*)updateButton {
635 return updateNowButton_; 635 return updateNowButton_;
636 } 636 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 NSRange string_range = NSMakeRange(0, [legal_block length]); 752 NSRange string_range = NSMakeRange(0, [legal_block length]);
753 [legal_block addAttribute:NSFontAttributeName 753 [legal_block addAttribute:NSFontAttributeName
754 value:[NSFont labelFontOfSize:11] 754 value:[NSFont labelFontOfSize:11]
755 range:string_range]; 755 range:string_range];
756 756
757 [legal_block endEditing]; 757 [legal_block endEditing];
758 return legal_block; 758 return legal_block;
759 } 759 }
760 760
761 @end // @implementation AboutWindowController 761 @end // @implementation AboutWindowController
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/preferences_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698