| 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_H_ | 5 #ifndef CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #import <AppKit/AppKit.h> | 8 #import <AppKit/AppKit.h> |
| 9 | 9 |
| 10 @class BackgroundTileView; | 10 @class BackgroundTileView; |
| 11 class Profile; | 11 class Profile; |
| 12 | 12 |
| 13 // This simple subclass of |NSTextView| just doesn't show the (text) cursor | 13 // This simple subclass of |NSTextView| just doesn't show the (text) cursor |
| 14 // (|NSTextView| displays the cursor with full keyboard accessibility enabled). | 14 // (|NSTextView| displays the cursor with full keyboard accessibility enabled). |
| 15 @interface AboutLegalTextView : NSTextView | 15 @interface AboutLegalTextView : NSTextView |
| 16 @end | 16 @end |
| 17 | 17 |
| 18 // A window controller that handles the About box. | 18 // A window controller that handles the About box. |
| 19 @interface AboutWindowController : NSWindowController { | 19 @interface AboutWindowController : NSWindowController { |
| 20 @private | 20 @private |
| 21 IBOutlet NSTextField* version_; | 21 IBOutlet NSTextField* version_; |
| 22 IBOutlet BackgroundTileView* backgroundView_; | 22 IBOutlet BackgroundTileView* backgroundView_; |
| 23 IBOutlet NSImageView* logoView_; | 23 IBOutlet NSImageView* logoView_; |
| 24 IBOutlet NSView* legalBlock_; | 24 IBOutlet NSView* legalBlock_; |
| 25 IBOutlet AboutLegalTextView* legalText_; | 25 IBOutlet AboutLegalTextView* legalText_; |
| 26 IBOutlet NSView* updateBlock_; // Holds everything related to updates | 26 |
| 27 // updateBlock_ holds the update image or throbber, update text, and update |
| 28 // button. |
| 29 IBOutlet NSView* updateBlock_; |
| 30 |
| 31 // promotionBlock_ holds the Keystone ticket promotion text and button. |
| 32 IBOutlet NSView* promotionBlock_; |
| 33 |
| 27 IBOutlet NSProgressIndicator* spinner_; | 34 IBOutlet NSProgressIndicator* spinner_; |
| 28 IBOutlet NSImageView* updateStatusIndicator_; | 35 IBOutlet NSImageView* updateStatusIndicator_; |
| 29 IBOutlet NSTextField* updateText_; | 36 IBOutlet NSTextField* updateText_; |
| 30 IBOutlet NSButton* updateNowButton_; | 37 IBOutlet NSButton* updateNowButton_; |
| 38 IBOutlet NSButton* promoteButton_; |
| 31 | 39 |
| 32 BOOL updateTriggered_; // Has an update ever been triggered? | |
| 33 Profile* profile_; // Weak, probably the default profile. | 40 Profile* profile_; // Weak, probably the default profile. |
| 41 |
| 42 // The window frame height. During an animation, this will contain the |
| 43 // height being animated to. |
| 44 CGFloat windowHeight_; |
| 34 } | 45 } |
| 35 | 46 |
| 36 // Initialize the controller with the given profile, but does not show it. | 47 // Initialize the controller with the given profile, but does not show it. |
| 37 // Callers still need to call showWindow: to put it on screen. | 48 // Callers still need to call showWindow: to put it on screen. |
| 38 - (id)initWithProfile:(Profile*)profile; | 49 - (id)initWithProfile:(Profile*)profile; |
| 39 | 50 |
| 40 // Trigger an update right now, as initiated by a button. | 51 // Trigger an update right now, as initiated by a button. |
| 41 - (IBAction)updateNow:(id)sender; | 52 - (IBAction)updateNow:(id)sender; |
| 42 | 53 |
| 54 // Install a system Keystone if necessary and promote the ticket to a system |
| 55 // ticket. |
| 56 - (IBAction)promoteUpdater:(id)sender; |
| 57 |
| 43 @end // @interface AboutWindowController | 58 @end // @interface AboutWindowController |
| 44 | 59 |
| 45 @interface AboutWindowController(JustForTesting) | 60 @interface AboutWindowController(JustForTesting) |
| 46 | 61 |
| 47 - (NSTextView*)legalText; | 62 - (NSTextView*)legalText; |
| 48 - (NSButton*)updateButton; | 63 - (NSButton*)updateButton; |
| 49 - (NSTextField*)updateText; | 64 - (NSTextField*)updateText; |
| 50 | 65 |
| 51 // Returns an NSAttributedString that contains locale-specific legal text. | 66 // Returns an NSAttributedString that contains locale-specific legal text. |
| 52 + (NSAttributedString*)legalTextBlock; | 67 + (NSAttributedString*)legalTextBlock; |
| 53 | 68 |
| 54 @end // @interface AboutWindowController(JustForTesting) | 69 @end // @interface AboutWindowController(JustForTesting) |
| 55 | 70 |
| 56 #endif // CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ | 71 #endif // CHROME_BROWSER_COCOA_ABOUT_WINDOW_CONTROLLER_H_ |
| OLD | NEW |