| 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_HELP_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/ui/webui/help/version_updater.h" |
| 12 #include "content/public/browser/web_ui_message_handler.h" |
| 13 |
| 14 // WebUI message handler for the help page. |
| 15 class HelpHandler : public content::WebUIMessageHandler { |
| 16 public: |
| 17 HelpHandler(); |
| 18 virtual ~HelpHandler(); |
| 19 |
| 20 // WebUIMessageHandler implementation. |
| 21 virtual void RegisterMessages() OVERRIDE; |
| 22 |
| 23 // Fills |localized_strings| with string values for the UI. |
| 24 void GetLocalizedValues(base::DictionaryValue* localized_strings); |
| 25 |
| 26 private: |
| 27 // Initiates the update process. |
| 28 void CheckForUpdate(const base::ListValue* args); |
| 29 |
| 30 // Relaunches the browser. |
| 31 void RelaunchNow(const base::ListValue* args); |
| 32 |
| 33 // Callback method which forwards status updates to the page. |
| 34 void UpdateStatus(VersionUpdater::Status status, int progress); |
| 35 |
| 36 // Specialized instance of the VersionUpdater used to update the browser. |
| 37 scoped_ptr<VersionUpdater> version_updater_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(HelpHandler); |
| 40 }; |
| 41 |
| 42 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| OLD | NEW |