| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 - (void)updateStatusDescription:(NSString*)text { | 104 - (void)updateStatusDescription:(NSString*)text { |
| 105 // First setStringValue statement is required to clear the original string. | 105 // First setStringValue statement is required to clear the original string. |
| 106 // Omitting the first line will cause occasional ghosting of the previous | 106 // Omitting the first line will cause occasional ghosting of the previous |
| 107 // string. | 107 // string. |
| 108 // TODO: Find a real solution to the ghosting problem. | 108 // TODO: Find a real solution to the ghosting problem. |
| 109 // downloadProgressDescription_.stringValue = @""; | 109 // downloadProgressDescription_.stringValue = @""; |
| 110 downloadProgressDescription_.stringValue = text; | 110 downloadProgressDescription_.stringValue = text; |
| 111 } | 111 } |
| 112 | 112 |
| 113 - (void)updateDownloadProgress:(double)progressPercent { | 113 - (void)updateDownloadProgress:(double)progressPercent { |
| 114 progressBar_.doubleValue = progressPercent; | 114 if (progressPercent > 0.0) { |
| 115 progressBar_.doubleValue = progressPercent; |
| 116 } else { |
| 117 progressBar_.doubleValue = 0.0; |
| 118 progressBar_.indeterminate = YES; |
| 119 [progressBar_ startAnimation:nil]; |
| 120 } |
| 115 } | 121 } |
| 116 | 122 |
| 117 @end | 123 @end |
| OLD | NEW |