| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "InstallerWindowController.h" | 5 #import "InstallerWindowController.h" |
| 6 | 6 |
| 7 #import "AppDelegate.h" | 7 #import "AppDelegate.h" |
| 8 | 8 |
| 9 @interface InstallerWindowController () { | 9 @interface InstallerWindowController () { |
| 10 // TODO: add in a "Launch" button |
| 10 NSButton* importButton_; | 11 NSButton* importButton_; |
| 11 NSButton* defaultBrowserButton_; | 12 NSButton* defaultBrowserButton_; |
| 12 NSButton* optInButton_; | 13 NSButton* optInButton_; |
| 13 NSTextField* statusDescription_; | 14 NSTextField* statusDescription_; |
| 14 NSTextField* downloadProgressDescription_; | 15 NSTextField* downloadProgressDescription_; |
| 15 NSProgressIndicator* progressBar_; | 16 NSProgressIndicator* progressBar_; |
| 16 } | 17 } |
| 17 @end | 18 @end |
| 18 | 19 |
| 19 @implementation InstallerWindowController | 20 @implementation InstallerWindowController |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 - (void)updateDownloadProgress:(double)progressPercent { | 114 - (void)updateDownloadProgress:(double)progressPercent { |
| 114 if (progressPercent > 0.0) { | 115 if (progressPercent > 0.0) { |
| 115 progressBar_.doubleValue = progressPercent; | 116 progressBar_.doubleValue = progressPercent; |
| 116 } else { | 117 } else { |
| 117 progressBar_.doubleValue = 0.0; | 118 progressBar_.doubleValue = 0.0; |
| 118 progressBar_.indeterminate = YES; | 119 progressBar_.indeterminate = YES; |
| 119 [progressBar_ startAnimation:nil]; | 120 [progressBar_ startAnimation:nil]; |
| 120 } | 121 } |
| 121 } | 122 } |
| 122 | 123 |
| 124 - (BOOL)isUserMetricsChecked { |
| 125 return optInButton_.state == NSOnState; |
| 126 } |
| 127 |
| 128 - (BOOL)isDefaultBrowserChecked { |
| 129 return defaultBrowserButton_.state == NSOnState; |
| 130 } |
| 131 |
| 123 @end | 132 @end |
| OLD | NEW |