Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3399)

Unified Diff: chrome/browser/ui/webui/help/help_handler.h

Issue 9320056: Help: Implement the initial version of the cross-platform help/about page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: String fix. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/help/help_handler.h
diff --git a/chrome/browser/ui/webui/help/help_handler.h b/chrome/browser/ui/webui/help/help_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..539bdd119e69cd7004572c19ea6a1b9eb9b2cff8
--- /dev/null
+++ b/chrome/browser/ui/webui/help/help_handler.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_
+
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "chrome/browser/ui/webui/help/version_updater.h"
+#include "content/public/browser/web_ui_message_handler.h"
+
+// WebUI message handler for the help page.
+class HelpHandler : public content::WebUIMessageHandler {
+ public:
+ HelpHandler();
+ virtual ~HelpHandler();
+
+ // WebUIMessageHandler implementation.
+ virtual void RegisterMessages() OVERRIDE;
+
+ // Fills |localized_strings| with string values for the UI.
+ void GetLocalizedValues(base::DictionaryValue* localized_strings);
+
+ private:
+ // Initiates the update process.
+ void CheckForUpdate(const base::ListValue* args);
+
+ // Relaunches the browser.
+ void RelaunchNow(const base::ListValue* args);
+
+ // Callback method which forwards status updates to the page.
+ void UpdateStatus(VersionUpdater::Status status, int progress);
+
+ // Specialized instance of the VersionUpdater used to update the browser.
+ scoped_ptr<VersionUpdater> version_updater_;
+
+ DISALLOW_COPY_AND_ASSIGN(HelpHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698