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 "NSAlert+ChromeInstallerAdditions.h" | 5 #import "NSAlert+ChromeInstallerAdditions.h" |
6 | 6 |
7 @implementation NSAlert (ChromeInstallerAdditions) | 7 @implementation NSAlert (ChromeInstallerAdditions) |
8 // In the one-button scenario, the button would be just "Quit." In the | 8 // In the one-button scenario, the button would be just "Quit." In the |
9 // two-button scenario, the first button would allow the user to "Retry" and | 9 // two-button scenario, the first button would allow the user to "Retry" and |
10 // the second button would provide the "Quit" option. | 10 // the second button would provide the "Quit" option. |
11 - (NSModalResponse)quitButton { | 11 - (NSModalResponse)quitResponse { |
12 return ([[self buttons] count] == 1) ? NSAlertFirstButtonReturn | 12 return ([[self buttons] count] == 1) ? NSAlertFirstButtonReturn |
13 : NSAlertSecondButtonReturn; | 13 : NSAlertSecondButtonReturn; |
14 } | 14 } |
15 @end | 15 @end |
OLD | NEW |