| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/string16.h" |
| 12 #include "chrome/browser/google/google_update.h" |
| 13 #include "chrome/browser/ui/webui/help/version_updater.h" |
| 14 |
| 15 namespace views { |
| 16 |
| 17 class Widget; |
| 18 |
| 19 } |
| 20 |
| 21 class VersionUpdaterWin : public VersionUpdater, |
| 22 public GoogleUpdateStatusListener { |
| 23 protected: |
| 24 friend class VersionUpdater; |
| 25 |
| 26 // Clients must use VersionUpdater::Create(). |
| 27 VersionUpdaterWin(); |
| 28 virtual ~VersionUpdaterWin(); |
| 29 |
| 30 private: |
| 31 // VersionUpdater implementation. |
| 32 static views::Widget* GetWidget(); |
| 33 virtual void CheckForUpdate(const StatusCallback& callback) OVERRIDE; |
| 34 virtual void RelaunchBrowser() const OVERRIDE; |
| 35 |
| 36 // GoogleUpdateStatusListener implementation. |
| 37 virtual void OnReportResults(GoogleUpdateUpgradeResult result, |
| 38 GoogleUpdateErrorCode error_code, |
| 39 const string16& error_message, |
| 40 const string16& version) OVERRIDE; |
| 41 |
| 42 // Update the UI to show the status of the upgrade. |
| 43 void UpdateStatus(GoogleUpdateUpgradeResult result, |
| 44 GoogleUpdateErrorCode error_code, |
| 45 const string16& error_message); |
| 46 |
| 47 // The class that communicates with Google Update to find out if an update is |
| 48 // available and asks it to start an upgrade. |
| 49 scoped_refptr<GoogleUpdate> google_updater_; |
| 50 |
| 51 // Callback used to communicate update status to the client. |
| 52 StatusCallback callback_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(VersionUpdaterWin); |
| 55 }; |
| 56 |
| 57 #endif // CHROME_BROWSER_UI_WEBUI_HELP_VERSION_UPDATER_WIN_H_ |
| OLD | NEW |