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

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

Issue 160341: First cut at Firefox import on OSX + stubs for Safari import. (Closed)
Patch Set: Address Stuart's comments. Created 11 years, 4 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #import "base/scoped_nsobject.h" 9 #import "base/scoped_nsobject.h"
10 10
11 @implementation FirstRunDialogController 11 @implementation FirstRunDialogController
12 12
13 @synthesize userDidCancel = user_did_cancel_; 13 @synthesize userDidCancel = user_did_cancel_;
14 @synthesize statsEnabled = stats_enabled_; 14 @synthesize statsEnabled = stats_enabled_;
15 @synthesize makeDefaultBrowser = make_default_browser_; 15 @synthesize makeDefaultBrowser = make_default_browser_;
16 @synthesize importBookmarks = import_bookmarks_; 16 @synthesize importBookmarks = import_bookmarks_;
17 @synthesize browserImportSelectedIndex = browser_import_selected_index_; 17 @synthesize browserImportSelectedIndex = browser_import_selected_index_;
18 @synthesize browserImportList = browser_import_list_;
18 19
19 - (id)init { 20 - (id)init {
20 self = [super initWithWindowNibName:@"FirstRunDialog"]; 21 self = [super initWithWindowNibName:@"FirstRunDialog"];
21 if (self != nil) { 22 if (self != nil) {
22 // Bound to the dialog checkbox, default to true. 23 // Bound to the dialog checkbox, default to true.
23 stats_enabled_ = YES; 24 stats_enabled_ = YES;
24 import_bookmarks_ = YES; 25 import_bookmarks_ = YES;
25 } 26 }
26 return self; 27 return self;
27 } 28 }
28 29
30 - (void)dealloc {
31 [browser_import_list_ release];
32 [super dealloc];
stuartmorgan 2009/07/29 20:22:37 Oops missed this before; indentation is off.
33 }
34
29 - (IBAction)showWindow:(id)sender { 35 - (IBAction)showWindow:(id)sender {
30 // Neat weirdness in the below code - the Application menu stays enabled 36 // Neat weirdness in the below code - the Application menu stays enabled
31 // while the window is open but selecting items from it (e.g. Quit) has 37 // while the window is open but selecting items from it (e.g. Quit) has
32 // no effect. I'm guessing that this is an artifact of us being a 38 // no effect. I'm guessing that this is an artifact of us being a
33 // background-only application at this stage and displaying a modal 39 // background-only application at this stage and displaying a modal
34 // window. 40 // window.
35 41
36 // Display dialog. 42 // Display dialog.
37 NSWindow* win = [self window]; 43 NSWindow* win = [self window];
38 [NSApp runModalForWindow:win]; 44 [NSApp runModalForWindow:win];
(...skipping 15 matching lines...) Expand all
54 60
55 - (IBAction)learnMore:(id)sender { 61 - (IBAction)learnMore:(id)sender {
56 // TODO(jeremy): Rather than always using English, set the language that 62 // TODO(jeremy): Rather than always using English, set the language that
57 // Chrome is running in. 63 // Chrome is running in.
58 NSURL* learnMoreUrl = [NSURL URLWithString:@"http://www.google.com/support/" 64 NSURL* learnMoreUrl = [NSURL URLWithString:@"http://www.google.com/support/"
59 "chrome/bin/answer.py?answer=96817&hl=en"]; 65 "chrome/bin/answer.py?answer=96817&hl=en"];
60 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl]; 66 [[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
61 } 67 }
62 68
63 @end 69 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698