Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/first_run_dialog.h" | 5 #import "chrome/browser/ui/cocoa/first_run_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/mac/bundle_locations.h" | 8 #include "base/mac/bundle_locations.h" |
| 9 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 152 | 152 |
| 153 @synthesize statsEnabled = statsEnabled_; | 153 @synthesize statsEnabled = statsEnabled_; |
| 154 @synthesize makeDefaultBrowser = makeDefaultBrowser_; | 154 @synthesize makeDefaultBrowser = makeDefaultBrowser_; |
| 155 | 155 |
| 156 - (id)init { | 156 - (id)init { |
| 157 NSString* nibpath = | 157 NSString* nibpath = |
| 158 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" | 158 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" |
| 159 ofType:@"nib"]; | 159 ofType:@"nib"]; |
| 160 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 160 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
| 161 // Bound to the dialog checkboxes. | 161 // Bound to the dialog checkboxes. |
| 162 makeDefaultBrowser_ = ShellIntegration::CanSetAsDefaultBrowser(); | 162 makeDefaultBrowser_ = ShellIntegration::CHANGE_DEFAULT_NOT_ALLOWED != |
|
grt (UTC plus 2)
2012/05/25 20:27:38
flip
motek.
2012/05/28 17:40:33
Done.
| |
| 163 ShellIntegration::CanSetAsDefaultBrowser(); | |
| 163 statsEnabled_ = StatsCheckboxDefault(); | 164 statsEnabled_ = StatsCheckboxDefault(); |
| 164 } | 165 } |
| 165 return self; | 166 return self; |
| 166 } | 167 } |
| 167 | 168 |
| 168 - (void)dealloc { | 169 - (void)dealloc { |
| 169 [super dealloc]; | 170 [super dealloc]; |
| 170 } | 171 } |
| 171 | 172 |
| 172 - (IBAction)showWindow:(id)sender { | 173 - (IBAction)showWindow:(id)sender { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 [NSApp stopModal]; | 286 [NSApp stopModal]; |
| 286 } | 287 } |
| 287 | 288 |
| 288 - (IBAction)learnMore:(id)sender { | 289 - (IBAction)learnMore:(id)sender { |
| 289 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); | 290 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); |
| 290 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 291 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
| 291 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 292 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
| 292 } | 293 } |
| 293 | 294 |
| 294 @end | 295 @end |
| OLD | NEW |