| OLD | NEW |
| 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/first_run_dialog.h" | 5 #import "chrome/browser/cocoa/first_run_dialog.h" |
| 6 | 6 |
| 7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
| 8 #include "base/mac_util.h" | 8 #include "base/mac_util.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 @synthesize statsEnabled = statsEnabled_; | 56 @synthesize statsEnabled = statsEnabled_; |
| 57 @synthesize makeDefaultBrowser = makeDefaultBrowser_; | 57 @synthesize makeDefaultBrowser = makeDefaultBrowser_; |
| 58 | 58 |
| 59 - (id)init { | 59 - (id)init { |
| 60 NSString* nibpath = | 60 NSString* nibpath = |
| 61 [mac_util::MainAppBundle() pathForResource:@"FirstRunDialog" | 61 [mac_util::MainAppBundle() pathForResource:@"FirstRunDialog" |
| 62 ofType:@"nib"]; | 62 ofType:@"nib"]; |
| 63 self = [super initWithWindowNibPath:nibpath owner:self]; | 63 self = [super initWithWindowNibPath:nibpath owner:self]; |
| 64 if (self != nil) { | 64 if (self != nil) { |
| 65 // Bound to the dialog checkbox, default to true. | 65 // Bound to the dialog checkbox, default to true. |
| 66 statsEnabled_ = YES; | 66 makeDefaultBrowser_ = YES; |
| 67 } | 67 } |
| 68 return self; | 68 return self; |
| 69 } | 69 } |
| 70 | 70 |
| 71 - (void)dealloc { | 71 - (void)dealloc { |
| 72 [super dealloc]; | 72 [super dealloc]; |
| 73 } | 73 } |
| 74 | 74 |
| 75 - (IBAction)showWindow:(id)sender { | 75 - (IBAction)showWindow:(id)sender { |
| 76 // The main MessageLoop has not yet run, but has been spun. If we call | 76 // The main MessageLoop has not yet run, but has been spun. If we call |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 [NSApp stopModal]; | 186 [NSApp stopModal]; |
| 187 } | 187 } |
| 188 | 188 |
| 189 - (IBAction)learnMore:(id)sender { | 189 - (IBAction)learnMore:(id)sender { |
| 190 NSString* urlStr = l10n_util::GetNSString(IDS_LEARN_MORE_REPORTING_URL); | 190 NSString* urlStr = l10n_util::GetNSString(IDS_LEARN_MORE_REPORTING_URL); |
| 191 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 191 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
| 192 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 192 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
| 193 } | 193 } |
| 194 | 194 |
| 195 @end | 195 @end |
| OLD | NEW |