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_ABOUT_PAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_ABOUT_PAGE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_ABOUT_PAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_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 #if defined(OS_CHROMEOS) | 12 #if defined(OS_CHROMEOS) |
13 #include "chrome/browser/chromeos/cros/update_library.h" | 13 #include "chrome/browser/chromeos/cros/update_library.h" |
14 #include "chrome/browser/chromeos/version_loader.h" | 14 #include "chrome/browser/chromeos/version_loader.h" |
15 #endif | 15 #endif |
16 | 16 |
17 // ChromeOS about page UI handler. | 17 // ChromeOS about page UI handler. |
18 class AboutPageHandler : public OptionsPageUIHandler { | 18 class AboutPageHandler : public OptionsPageUIHandler { |
19 public: | 19 public: |
20 AboutPageHandler(); | 20 AboutPageHandler(); |
21 virtual ~AboutPageHandler(); | 21 virtual ~AboutPageHandler(); |
22 | 22 |
23 // OptionsPageUIHandler implementation. | 23 // OptionsPageUIHandler implementation. |
24 virtual void GetLocalizedValues(DictionaryValue* localized_strings); | 24 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings); |
25 virtual void RegisterMessages(); | 25 virtual void RegisterMessages(); |
26 | 26 |
27 private: | 27 private: |
28 // The function is called from JavaScript when the about page is ready. | 28 // The function is called from JavaScript when the about page is ready. |
29 void PageReady(const ListValue* args); | 29 void PageReady(const base::ListValue* args); |
30 | 30 |
31 // The function is called from JavaScript to set the release track like | 31 // The function is called from JavaScript to set the release track like |
32 // "beta-channel" and "dev-channel". | 32 // "beta-channel" and "dev-channel". |
33 void SetReleaseTrack(const ListValue* args); | 33 void SetReleaseTrack(const base::ListValue* args); |
34 | 34 |
35 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
36 // Initiates update check. | 36 // Initiates update check. |
37 void CheckNow(const ListValue* args); | 37 void CheckNow(const base::ListValue* args); |
38 | 38 |
39 // Restarts the system. | 39 // Restarts the system. |
40 void RestartNow(const ListValue* args); | 40 void RestartNow(const base::ListValue* args); |
41 | 41 |
42 // Callback from chromeos::VersionLoader giving the version. | 42 // Callback from chromeos::VersionLoader giving the version. |
43 void OnOSVersion(chromeos::VersionLoader::Handle handle, | 43 void OnOSVersion(chromeos::VersionLoader::Handle handle, |
44 std::string version); | 44 std::string version); |
45 void OnOSFirmware(chromeos::VersionLoader::Handle handle, | 45 void OnOSFirmware(chromeos::VersionLoader::Handle handle, |
46 std::string firmware); | 46 std::string firmware); |
47 void UpdateStatus(const chromeos::UpdateLibrary::Status& status); | 47 void UpdateStatus(const chromeos::UpdateLibrary::Status& status); |
48 | 48 |
49 // UpdateEngine Callback handler. | 49 // UpdateEngine Callback handler. |
50 static void UpdateSelectedChannel(void* user_data, const char* channel); | 50 static void UpdateSelectedChannel(void* user_data, const char* channel); |
(...skipping 10 matching lines...) Expand all Loading... |
61 | 61 |
62 int progress_; | 62 int progress_; |
63 bool sticky_; | 63 bool sticky_; |
64 bool started_; | 64 bool started_; |
65 #endif | 65 #endif |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); | 67 DISALLOW_COPY_AND_ASSIGN(AboutPageHandler); |
68 }; | 68 }; |
69 | 69 |
70 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_ABOUT_PAGE_HANDLER_H_ | 70 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_ABOUT_PAGE_HANDLER_H_ |
OLD | NEW |