Chromium Updater
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.8 KiB

13 years ago
13 years ago
  1. //
  2. // MGMController.h
  3. // Chromatic
  4. //
  5. // Created by Mr. Gecko on 6/9/11.
  6. // Copyright (c) 2011 Mr. Gecko's Media (James Coleman). http://mrgeckosmedia.com/
  7. //
  8. // Permission to use, copy, modify, and/or distribute this software for any purpose
  9. // with or without fee is hereby granted, provided that the above copyright notice
  10. // and this permission notice appear in all copies.
  11. //
  12. // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  13. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  14. // FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
  15. // OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  16. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  17. // ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. //
  19. #import <Cocoa/Cocoa.h>
  20. @class MGMAbout, MGMPreferences, MGMURLConnectionManager, MGMURLBasicHandler, WebView;
  21. extern NSString * const MGMCustomSnapshotURL;
  22. extern NSString * const MGMMoveToTrash;
  23. extern NSString * const MGMDoneSound;
  24. extern NSString * const MGMLaunchWhenDone;
  25. extern NSString * const MGMQuitAfterLaunch;
  26. @interface MGMController : NSObject
  27. #if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)
  28. <NSApplicationDelegate>
  29. #endif
  30. {
  31. IBOutlet NSWindow *mainWindow;
  32. MGMAbout *about;
  33. MGMPreferences *preferences;
  34. MGMURLConnectionManager *connectionManager;
  35. BOOL startingUp;
  36. NSMutableDictionary *channelRevisions;
  37. NSString *chromiumPath;
  38. NSMutableArray *revisionsArray;
  39. IBOutlet NSPopUpButton *channelPopUp;
  40. IBOutlet NSTextField *buildWarningField;
  41. IBOutlet NSPopUpButton *buildPopUp;
  42. IBOutlet NSTextField *webKitBuildField;
  43. IBOutlet NSTextField *v8BuildField;
  44. IBOutlet NSTextField *buildDateField;
  45. IBOutlet NSTextField *yourBuildField;
  46. IBOutlet NSTextField *installDateField;
  47. IBOutlet NSTextField *pathField;
  48. IBOutlet NSProgressIndicator *progress;
  49. IBOutlet NSTextField *statusField;
  50. IBOutlet NSButton *launchButton;
  51. IBOutlet NSButton *svnLogsButton;
  52. IBOutlet NSButton *updateButton;
  53. IBOutlet NSWindow *svnLogsWindow;
  54. IBOutlet WebView *svnLogsBrowser;
  55. int startTime;
  56. MGMURLBasicHandler *updateHandler;
  57. NSDate *lastCheck;
  58. unsigned long bytesReceived;
  59. unsigned long averageBytesReceived;
  60. unsigned long totalBytes;
  61. NSMutableArray *bytesReceivedArray;
  62. NSTask *unzipTask;
  63. }
  64. - (void)registerDefaults;
  65. - (IBAction)about:(id)sender;
  66. - (IBAction)preferences:(id)sender;
  67. - (IBAction)donate:(id)sender;
  68. - (IBAction)openSource:(id)sender;
  69. - (IBAction)channelSelect:(id)sender;
  70. - (IBAction)buildSelect:(id)sender;
  71. - (IBAction)choosePath:(id)sender;
  72. - (void)updateChromiumPath;
  73. - (IBAction)launchChromium:(id)sender;
  74. - (IBAction)viewSVNLogs:(id)sender;
  75. - (IBAction)update:(id)sender;
  76. - (void)updateDone;
  77. @end