Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / webui / help / help_handler.h
index 812f40b..f093239 100644 (file)
@@ -9,17 +9,20 @@
 
 #include "base/compiler_specific.h"
 #include "base/memory/weak_ptr.h"
+#include "base/strings/string16.h"
 #include "chrome/browser/ui/webui/help/version_updater.h"
 #include "content/public/browser/notification_observer.h"
 #include "content/public/browser/notification_registrar.h"
 #include "content/public/browser/web_ui_message_handler.h"
 
 #if defined(OS_CHROMEOS)
+#include "base/task/cancelable_task_tracker.h"
 #include "chrome/browser/chromeos/version_loader.h"
 #endif  // defined(OS_CHROMEOS)
 
-namespace content {
-class WebUIDataSource;
+namespace base {
+class DictionaryValue;
+class ListValue;
 }
 
 // WebUI message handler for the help page.
@@ -32,13 +35,16 @@ class HelpHandler : public content::WebUIMessageHandler,
   // WebUIMessageHandler implementation.
   virtual void RegisterMessages() OVERRIDE;
 
-  // Fills |source| with string values for the UI.
-  void GetLocalizedValues(content::WebUIDataSource* source);
+  // Adds string values for the UI to |localized_strings|.
+  static void GetLocalizedValues(base::DictionaryValue* localized_strings);
 
   // NotificationObserver implementation.
   virtual void Observe(int type, const content::NotificationSource& source,
                        const content::NotificationDetails& details) OVERRIDE;
 
+  // Returns the browser version as a string.
+  static base::string16 BuildBrowserVersionString();
+
  private:
   // Initializes querying values for the page.
   void OnPageLoaded(const base::ListValue* args);
@@ -65,6 +71,9 @@ class HelpHandler : public content::WebUIMessageHandler,
   void RelaunchAndPowerwash(const base::ListValue* args);
 #endif
 
+  // Checks for and applies update.
+  void RequestUpdate(const base::ListValue* args);
+
   // Callback method which forwards status updates to the page.
   void SetUpdateStatus(VersionUpdater::Status status, int progress,
                        const base::string16& fail_message);