| 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_HELP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void RelaunchNow(const base::ListValue* args); | 53 void RelaunchNow(const base::ListValue* args); |
| 54 | 54 |
| 55 // Opens the feedback dialog. |args| must be empty. | 55 // Opens the feedback dialog. |args| must be empty. |
| 56 void OpenFeedbackDialog(const base::ListValue* args); | 56 void OpenFeedbackDialog(const base::ListValue* args); |
| 57 | 57 |
| 58 // Opens the help page. |args| must be empty. | 58 // Opens the help page. |args| must be empty. |
| 59 void OpenHelpPage(const base::ListValue* args); | 59 void OpenHelpPage(const base::ListValue* args); |
| 60 | 60 |
| 61 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| 62 // Sets the release track version. | 62 // Sets the release track version. |
| 63 void SetReleaseTrack(const base::ListValue* args); | 63 void SetChannel(const base::ListValue* args); |
| 64 |
| 65 // Performs relaunch and powerwash. |
| 66 void RelaunchAndPowerwash(const base::ListValue* args); |
| 64 #endif | 67 #endif |
| 65 | 68 |
| 66 // Callback method which forwards status updates to the page. | 69 // Callback method which forwards status updates to the page. |
| 67 void SetUpdateStatus(VersionUpdater::Status status, int progress, | 70 void SetUpdateStatus(VersionUpdater::Status status, int progress, |
| 68 const string16& fail_message); | 71 const string16& fail_message); |
| 69 | 72 |
| 70 #if defined(OS_MACOSX) | 73 #if defined(OS_MACOSX) |
| 71 // Callback method which forwards promotion state to the page. | 74 // Callback method which forwards promotion state to the page. |
| 72 void SetPromotionState(VersionUpdater::PromotionState state); | 75 void SetPromotionState(VersionUpdater::PromotionState state); |
| 73 #endif | 76 #endif |
| 74 | 77 |
| 75 #if defined(OS_CHROMEOS) | 78 #if defined(OS_CHROMEOS) |
| 76 // Callbacks from VersionLoader. | 79 // Callbacks from VersionLoader. |
| 77 void OnOSVersion(const std::string& version); | 80 void OnOSVersion(const std::string& version); |
| 78 void OnOSFirmware(const std::string& firmware); | 81 void OnOSFirmware(const std::string& firmware); |
| 79 void OnReleaseChannel(const std::string& channel); | 82 void OnCurrentChannel(const std::string& channel); |
| 83 void OnTargetChannel(const std::string& channel); |
| 80 | 84 |
| 81 void ProcessLsbFileInfo( | 85 void ProcessLsbFileInfo( |
| 82 base::PlatformFileError rv, const base::PlatformFileInfo& file_info); | 86 base::PlatformFileError rv, const base::PlatformFileInfo& file_info); |
| 83 #endif | 87 #endif |
| 84 | 88 |
| 85 // Specialized instance of the VersionUpdater used to update the browser. | 89 // Specialized instance of the VersionUpdater used to update the browser. |
| 86 scoped_ptr<VersionUpdater> version_updater_; | 90 scoped_ptr<VersionUpdater> version_updater_; |
| 87 | 91 |
| 88 // Used for callbacks. | 92 // Used for callbacks. |
| 89 base::WeakPtrFactory<HelpHandler> weak_factory_; | 93 base::WeakPtrFactory<HelpHandler> weak_factory_; |
| 90 | 94 |
| 91 // Used to observe notifications. | 95 // Used to observe notifications. |
| 92 content::NotificationRegistrar registrar_; | 96 content::NotificationRegistrar registrar_; |
| 93 | 97 |
| 94 #if defined(OS_CHROMEOS) | 98 #if defined(OS_CHROMEOS) |
| 95 // Handles asynchronously loading the CrOS version info. | 99 // Handles asynchronously loading the CrOS version info. |
| 96 chromeos::VersionLoader loader_; | 100 chromeos::VersionLoader loader_; |
| 97 | 101 |
| 98 // Used to request the version. | 102 // Used to request the version. |
| 99 CancelableTaskTracker tracker_; | 103 CancelableTaskTracker tracker_; |
| 100 #endif // defined(OS_CHROMEOS) | 104 #endif // defined(OS_CHROMEOS) |
| 101 | 105 |
| 102 DISALLOW_COPY_AND_ASSIGN(HelpHandler); | 106 DISALLOW_COPY_AND_ASSIGN(HelpHandler); |
| 103 }; | 107 }; |
| 104 | 108 |
| 105 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ | 109 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| OLD | NEW |