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 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 @synthesize statsEnabled = statsEnabled_; | 134 @synthesize statsEnabled = statsEnabled_; |
135 @synthesize makeDefaultBrowser = makeDefaultBrowser_; | 135 @synthesize makeDefaultBrowser = makeDefaultBrowser_; |
136 | 136 |
137 - (id)init { | 137 - (id)init { |
138 NSString* nibpath = | 138 NSString* nibpath = |
139 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" | 139 [base::mac::FrameworkBundle() pathForResource:@"FirstRunDialog" |
140 ofType:@"nib"]; | 140 ofType:@"nib"]; |
141 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { | 141 if ((self = [super initWithWindowNibPath:nibpath owner:self])) { |
142 // Bound to the dialog checkboxes. | 142 // Bound to the dialog checkboxes. |
143 makeDefaultBrowser_ = shell_integration::CanSetAsDefaultBrowser() != | 143 makeDefaultBrowser_ = shell_integration::CanSetAsDefaultBrowser(); |
144 shell_integration::SET_DEFAULT_NOT_ALLOWED; | |
145 statsEnabled_ = StatsCheckboxDefault(); | 144 statsEnabled_ = StatsCheckboxDefault(); |
146 } | 145 } |
147 return self; | 146 return self; |
148 } | 147 } |
149 | 148 |
150 - (void)dealloc { | 149 - (void)dealloc { |
151 [super dealloc]; | 150 [super dealloc]; |
152 } | 151 } |
153 | 152 |
154 - (IBAction)showWindow:(id)sender { | 153 - (IBAction)showWindow:(id)sender { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 [NSApp stopModal]; | 274 [NSApp stopModal]; |
276 } | 275 } |
277 | 276 |
278 - (IBAction)learnMore:(id)sender { | 277 - (IBAction)learnMore:(id)sender { |
279 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); | 278 NSString* urlStr = base::SysUTF8ToNSString(chrome::kLearnMoreReportingURL); |
280 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; | 279 NSURL* learnMoreUrl = [NSURL URLWithString:urlStr]; |
281 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; | 280 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; |
282 } | 281 } |
283 | 282 |
284 @end | 283 @end |
OLD | NEW |