| 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 NSButton* importButton_; | 10 NSButton* importButton_; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 - (void)updateStatusDescription:(NSString*)text { | 113 - (void)updateStatusDescription:(NSString*)text { |
| 114 // First setStringValue statement is required to clear the original string. | 114 // First setStringValue statement is required to clear the original string. |
| 115 // Omitting the first line will cause occasional ghosting of the previous | 115 // Omitting the first line will cause occasional ghosting of the previous |
| 116 // string. | 116 // string. |
| 117 // TODO: Find a real solution to the ghosting problem. | 117 // TODO: Find a real solution to the ghosting problem. |
| 118 // downloadProgressDescription_.stringValue = @""; | 118 // downloadProgressDescription_.stringValue = @""; |
| 119 downloadProgressDescription_.stringValue = text; | 119 downloadProgressDescription_.stringValue = text; |
| 120 } | 120 } |
| 121 | 121 |
| 122 - (void)updateDownloadProgress:(double)progressPercent { | 122 - (void)updateDownloadProgress:(double)progressPercent { |
| 123 progressBar_.doubleValue = progressPercent; | 123 if (progressPercent > 0.0) { |
| 124 progressBar_.doubleValue = progressPercent; |
| 125 } else { |
| 126 progressBar_.doubleValue = 0.0; |
| 127 progressBar_.indeterminate = YES; |
| 128 [progressBar_ startAnimation:nil]; |
| 129 } |
| 124 } | 130 } |
| 125 | 131 |
| 126 - (void)enableLaunchButton { | 132 - (void)enableLaunchButton { |
| 127 [launchButton_ setEnabled:YES]; | 133 [launchButton_ setEnabled:YES]; |
| 128 } | 134 } |
| 129 | 135 |
| 130 - (void)launchButtonClicked { | 136 - (void)launchButtonClicked { |
| 131 // TODO: Launch the app and start ejecting disk. | 137 // TODO: Launch the app and start ejecting disk. |
| 132 [NSApp terminate:nil]; | 138 [NSApp terminate:nil]; |
| 133 } | 139 } |
| 134 | 140 |
| 135 @end | 141 @end |
| OLD | NEW |