| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_MAC_H_ | 5 #ifndef CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_MAC_H_ | 6 #define CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include "base/scoped_nsobject.h" |
| 9 #import "chrome/app/keystone_glue.h" | 10 #import "chrome/app/keystone_glue.h" |
| 10 | 11 |
| 11 @class AppController; | 12 @class BackgroundTileView; |
| 12 | 13 |
| 13 // A window controller that handles the branded (Chrome.app) about | 14 // A window controller that handles the branded (Chrome.app) about |
| 14 // window. The branded about window has a few features beyond the | 15 // window. The branded about window has a few features beyond the |
| 15 // standard Cocoa about panel. For example, opening the about window | 16 // standard Cocoa about panel. For example, opening the about window |
| 16 // will check to see if this version is current and tell the user. | 17 // will check to see if this version is current and tell the user. |
| 17 // There is also an "update me now" button with a progress spinner. | 18 // There is also an "update me now" button with a progress spinner. |
| 18 @interface AboutWindowController : NSWindowController<KeystoneGlueCallbacks> { | 19 @interface AboutWindowController : NSWindowController<KeystoneGlueCallbacks> { |
| 19 @private | 20 @private |
| 20 IBOutlet NSTextField* version_; | 21 IBOutlet NSTextField* version_; |
| 21 IBOutlet NSTextField* upToDate_; | 22 IBOutlet BackgroundTileView* backgroundView_; |
| 22 IBOutlet NSTextField* updateCompleted_; | 23 IBOutlet NSImageView* logoView_; |
| 24 IBOutlet NSTextField* legalBlock_; |
| 25 IBOutlet NSView* updateBlock_; // Holds everything related to updates |
| 23 IBOutlet NSProgressIndicator* spinner_; | 26 IBOutlet NSProgressIndicator* spinner_; |
| 27 IBOutlet NSImageView* updateStatusIndicator_; |
| 28 IBOutlet NSTextField* updateText_; |
| 24 IBOutlet NSButton* updateNowButton_; | 29 IBOutlet NSButton* updateNowButton_; |
| 25 | 30 |
| 26 BOOL updateTriggered_; // Has an update ever been triggered? | 31 BOOL updateTriggered_; // Has an update ever been triggered? |
| 32 |
| 33 // The version we got told about by Keystone |
| 34 scoped_nsobject<NSString> newVersionAvailable_; |
| 27 } | 35 } |
| 28 | 36 |
| 29 // Trigger an update right now, as initiated by a button. | 37 // Trigger an update right now, as initiated by a button. |
| 30 - (IBAction)updateNow:(id)sender; | 38 - (IBAction)updateNow:(id)sender; |
| 31 | 39 |
| 32 @end | 40 @end |
| 33 | 41 |
| 34 | 42 |
| 35 @interface AboutWindowController (JustForTesting) | 43 @interface AboutWindowController (JustForTesting) |
| 36 - (NSButton*)updateButton; | 44 - (NSButton*)updateButton; |
| 37 - (NSTextField*)upToDateTextField; | 45 - (NSTextField*)updateText; |
| 38 - (NSTextField*)updateCompletedTextField; | |
| 39 @end | 46 @end |
| 40 | 47 |
| 41 | 48 |
| 42 // NSNotification sent when the about window is closed. | 49 // NSNotification sent when the about window is closed. |
| 43 extern NSString* const kUserClosedAboutNotification; | 50 extern NSString* const kUserClosedAboutNotification; |
| 44 | 51 |
| 45 #endif | 52 #endif // CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |