| 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 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 // WebUI message handler for the help page. | 28 // WebUI message handler for the help page. |
| 29 class HelpHandler : public content::WebUIMessageHandler, | 29 class HelpHandler : public content::WebUIMessageHandler, |
| 30 public content::NotificationObserver { | 30 public content::NotificationObserver { |
| 31 public: | 31 public: |
| 32 HelpHandler(); | 32 HelpHandler(); |
| 33 virtual ~HelpHandler(); | 33 virtual ~HelpHandler(); |
| 34 | 34 |
| 35 // WebUIMessageHandler implementation. | 35 // WebUIMessageHandler implementation. |
| 36 virtual void RegisterMessages() OVERRIDE; | 36 virtual void RegisterMessages() override; |
| 37 | 37 |
| 38 // Adds string values for the UI to |localized_strings|. | 38 // Adds string values for the UI to |localized_strings|. |
| 39 static void GetLocalizedValues(base::DictionaryValue* localized_strings); | 39 static void GetLocalizedValues(base::DictionaryValue* localized_strings); |
| 40 | 40 |
| 41 // NotificationObserver implementation. | 41 // NotificationObserver implementation. |
| 42 virtual void Observe(int type, const content::NotificationSource& source, | 42 virtual void Observe(int type, const content::NotificationSource& source, |
| 43 const content::NotificationDetails& details) OVERRIDE; | 43 const content::NotificationDetails& details) override; |
| 44 | 44 |
| 45 // Returns the browser version as a string. | 45 // Returns the browser version as a string. |
| 46 static base::string16 BuildBrowserVersionString(); | 46 static base::string16 BuildBrowserVersionString(); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // Initializes querying values for the page. | 49 // Initializes querying values for the page. |
| 50 void OnPageLoaded(const base::ListValue* args); | 50 void OnPageLoaded(const base::ListValue* args); |
| 51 | 51 |
| 52 #if defined(OS_MACOSX) | 52 #if defined(OS_MACOSX) |
| 53 // Promotes the updater for all users. | 53 // Promotes the updater for all users. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 base::CancelableTaskTracker tracker_; | 105 base::CancelableTaskTracker tracker_; |
| 106 #endif // defined(OS_CHROMEOS) | 106 #endif // defined(OS_CHROMEOS) |
| 107 | 107 |
| 108 // Used for callbacks. | 108 // Used for callbacks. |
| 109 base::WeakPtrFactory<HelpHandler> weak_factory_; | 109 base::WeakPtrFactory<HelpHandler> weak_factory_; |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(HelpHandler); | 111 DISALLOW_COPY_AND_ASSIGN(HelpHandler); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ | 114 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| OLD | NEW |