Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OPTIONS_CHROMEOS_ABOUT_PAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ABOUT_PAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ABOUT_PAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ABOUT_PAGE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/ui/webui/options/options_ui.h" | 10 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 11 | 11 |
| 12 #include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler. h" | 12 #include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler. h" |
| 13 #include "chrome/browser/chromeos/cros/update_library.h" | 13 #include "chrome/browser/chromeos/dbus/update_engine_client.h" |
| 14 #include "chrome/browser/chromeos/version_loader.h" | 14 #include "chrome/browser/chromeos/version_loader.h" |
| 15 | 15 |
| 16 namespace chromeos { | 16 namespace chromeos { |
| 17 | 17 |
| 18 // ChromeOS about page UI handler. | 18 // ChromeOS about page UI handler. |
| 19 class AboutPageHandler : public CrosOptionsPageUIHandler { | 19 class AboutPageHandler : public CrosOptionsPageUIHandler { |
| 20 | 20 |
| 21 public: | 21 public: |
| 22 AboutPageHandler(); | 22 AboutPageHandler(); |
| 23 virtual ~AboutPageHandler(); | 23 virtual ~AboutPageHandler(); |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 38 void CheckNow(const base::ListValue* args); | 38 void CheckNow(const base::ListValue* args); |
| 39 | 39 |
| 40 // Restarts the system. | 40 // Restarts the system. |
| 41 void RestartNow(const base::ListValue* args); | 41 void RestartNow(const base::ListValue* args); |
| 42 | 42 |
| 43 // Callback from VersionLoader giving the version. | 43 // Callback from VersionLoader giving the version. |
| 44 void OnOSVersion(VersionLoader::Handle handle, | 44 void OnOSVersion(VersionLoader::Handle handle, |
| 45 std::string version); | 45 std::string version); |
| 46 void OnOSFirmware(VersionLoader::Handle handle, | 46 void OnOSFirmware(VersionLoader::Handle handle, |
| 47 std::string firmware); | 47 std::string firmware); |
| 48 void UpdateStatus(const UpdateLibrary::Status& status); | 48 void UpdateStatus(const UpdateEngineClient::Status& status); |
| 49 | 49 |
| 50 // UpdateEngine Callback handler. | 50 // UpdateEngine Callback handler. |
| 51 static void UpdateSelectedChannel(void* user_data, const char* channel); | 51 class UpdateObserver; |
|
stevenjb
2011/11/21 19:28:05
nit: Forward declaration at start of section? (I d
satorux1
2011/11/22 07:33:05
Done.
| |
| 52 static void UpdateSelectedChannel(UpdateObserver* observer, | |
| 53 const std::string& channel); | |
| 52 | 54 |
| 53 // Handles asynchronously loading the version. | 55 // Handles asynchronously loading the version. |
| 54 VersionLoader loader_; | 56 VersionLoader loader_; |
| 55 | 57 |
| 56 // Used to request the version. | 58 // Used to request the version. |
| 57 CancelableRequestConsumer consumer_; | 59 CancelableRequestConsumer consumer_; |
| 58 | 60 |
| 59 // Update Observer | 61 // Update Observer |
| 60 class UpdateObserver; | |
| 61 scoped_ptr<UpdateObserver> update_observer_; | 62 scoped_ptr<UpdateObserver> update_observer_; |
| 62 | 63 |
| 63 int progress_; | 64 int progress_; |
| 64 bool sticky_; | 65 bool sticky_; |
| 65 bool started_; | 66 bool started_; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); | 68 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace chromeos | 71 } // namespace chromeos |
| 71 | 72 |
| 72 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ABOUT_PAGE_HANDLER_H_ | 73 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ABOUT_PAGE_HANDLER_H_ |
| OLD | NEW |