| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_SETTINGS_ABOUT_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // Callbacks for version_updater_->GetChannel calls. | 102 // Callbacks for version_updater_->GetChannel calls. |
| 103 void OnGetCurrentChannel(std::string callback_id, | 103 void OnGetCurrentChannel(std::string callback_id, |
| 104 const std::string& current_channel); | 104 const std::string& current_channel); |
| 105 void OnGetTargetChannel(std::string callback_id, | 105 void OnGetTargetChannel(std::string callback_id, |
| 106 const std::string& current_channel, | 106 const std::string& current_channel, |
| 107 const std::string& target_channel); | 107 const std::string& target_channel); |
| 108 | 108 |
| 109 // Checks for and applies update, triggered by JS. | 109 // Checks for and applies update, triggered by JS. |
| 110 void HandleRequestUpdate(const base::ListValue* args); | 110 void HandleRequestUpdate(const base::ListValue* args); |
| 111 | 111 |
| 112 // Checks for and applies update over cellular connection, triggered by JS. |
| 113 // Target version and size should be included in the list of arguments. |
| 114 void HandleRequestUpdateOverCellular(const base::ListValue* args); |
| 115 |
| 116 // Checks for and applies update over cellular connection to the given target. |
| 117 void RequestUpdateOverCellular(const std::string& target_version, |
| 118 int64_t target_size); |
| 119 |
| 112 #endif | 120 #endif |
| 113 | 121 |
| 114 // Checks for and applies update. | 122 // Checks for and applies update. |
| 115 void RequestUpdate(); | 123 void RequestUpdate(); |
| 116 | 124 |
| 117 // Callback method which forwards status updates to the page. | 125 // Callback method which forwards status updates to the page. |
| 118 void SetUpdateStatus(VersionUpdater::Status status, | 126 void SetUpdateStatus(VersionUpdater::Status status, |
| 119 int progress, | 127 int progress, |
| 128 const std::string& version, |
| 129 int64_t size, |
| 120 const base::string16& fail_message); | 130 const base::string16& fail_message); |
| 121 | 131 |
| 122 #if defined(OS_MACOSX) | 132 #if defined(OS_MACOSX) |
| 123 // Callback method which forwards promotion state to the page. | 133 // Callback method which forwards promotion state to the page. |
| 124 void SetPromotionState(VersionUpdater::PromotionState state); | 134 void SetPromotionState(VersionUpdater::PromotionState state); |
| 125 #endif | 135 #endif |
| 126 | 136 |
| 127 #if defined(OS_CHROMEOS) | 137 #if defined(OS_CHROMEOS) |
| 128 void HandleGetRegulatoryInfo(const base::ListValue* args); | 138 void HandleGetRegulatoryInfo(const base::ListValue* args); |
| 129 | 139 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 149 | 159 |
| 150 // Used for callbacks. | 160 // Used for callbacks. |
| 151 base::WeakPtrFactory<AboutHandler> weak_factory_; | 161 base::WeakPtrFactory<AboutHandler> weak_factory_; |
| 152 | 162 |
| 153 DISALLOW_COPY_AND_ASSIGN(AboutHandler); | 163 DISALLOW_COPY_AND_ASSIGN(AboutHandler); |
| 154 }; | 164 }; |
| 155 | 165 |
| 156 } // namespace settings | 166 } // namespace settings |
| 157 | 167 |
| 158 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ | 168 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_ABOUT_HANDLER_H_ |
| OLD | NEW |