| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_WEBUI_HELP_VERSION_UPDATER_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_MAC_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_MAC_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_MAC_H_ |
| 7 | 7 |
| 8 #import <AppKit/AppKit.h> | 8 #import <AppKit/AppKit.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "chrome/browser/ui/webui/help/version_updater.h" | 13 #include "chrome/browser/ui/webui/help/version_updater.h" |
| 14 | 14 |
| 15 @class KeystoneObserver; | 15 @class KeystoneObserver; |
| 16 | 16 |
| 17 // OS X implementation of version update functionality, used by the WebUI | 17 // OS X implementation of version update functionality, used by the WebUI |
| 18 // About/Help page. | 18 // About/Help page. |
| 19 class VersionUpdaterMac : public VersionUpdater { | 19 class VersionUpdaterMac : public VersionUpdater { |
| 20 public: | 20 public: |
| 21 // VersionUpdater implementation. | 21 // VersionUpdater implementation. |
| 22 void CheckForUpdate(const StatusCallback& status_callback, | 22 void CheckForUpdate(const StatusCallback& status_callback, |
| 23 const PromoteCallback& promote_callback) override; | 23 const PromoteCallback& promote_callback) override; |
| 24 void PromoteUpdater() const override; | 24 void PromoteUpdater() const override; |
| 25 void RelaunchBrowser() const override; | |
| 26 | 25 |
| 27 // Process status updates received from Keystone. The dictionary will contain | 26 // Process status updates received from Keystone. The dictionary will contain |
| 28 // an AutoupdateStatus value as an intValue at key kAutoupdateStatusStatus. If | 27 // an AutoupdateStatus value as an intValue at key kAutoupdateStatusStatus. If |
| 29 // a version is available (see AutoupdateStatus), it will be present at key | 28 // a version is available (see AutoupdateStatus), it will be present at key |
| 30 // kAutoupdateStatusVersion. | 29 // kAutoupdateStatusVersion. |
| 31 void UpdateStatus(NSDictionary* status); | 30 void UpdateStatus(NSDictionary* status); |
| 32 | 31 |
| 33 protected: | 32 protected: |
| 34 friend class VersionUpdater; | 33 friend class VersionUpdater; |
| 35 | 34 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 51 bool show_promote_button_; | 50 bool show_promote_button_; |
| 52 | 51 |
| 53 // The observer that will receive keystone status updates. | 52 // The observer that will receive keystone status updates. |
| 54 base::scoped_nsobject<KeystoneObserver> keystone_observer_; | 53 base::scoped_nsobject<KeystoneObserver> keystone_observer_; |
| 55 | 54 |
| 56 DISALLOW_COPY_AND_ASSIGN(VersionUpdaterMac); | 55 DISALLOW_COPY_AND_ASSIGN(VersionUpdaterMac); |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 #endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_MAC_H_ | 58 #endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_MAC_H_ |
| 60 | 59 |
| OLD | NEW |