| 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" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "chrome/browser/ui/webui/help/version_updater.h" | 15 #include "chrome/browser/ui/webui/help/version_updater.h" |
| 16 #include "components/policy/core/common/policy_service.h" | 16 #include "components/policy/core/common/policy_service.h" |
| 17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
| 18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
| 19 #include "content/public/browser/web_ui_message_handler.h" | 19 #include "content/public/browser/web_ui_message_handler.h" |
| 20 | 20 |
| 21 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
| 22 #include "base/task/cancelable_task_tracker.h" | 22 #include "base/task/cancelable_task_tracker.h" |
| 23 #include "chromeos/system/version_loader.h" | 23 #include "chromeos/system/version_loader.h" |
| 24 #include "third_party/cros_system_api/dbus/update_engine/dbus-constants.h" |
| 24 #endif // defined(OS_CHROMEOS) | 25 #endif // defined(OS_CHROMEOS) |
| 25 | 26 |
| 26 namespace base { | 27 namespace base { |
| 27 class DictionaryValue; | 28 class DictionaryValue; |
| 28 class FilePath; | 29 class FilePath; |
| 29 class ListValue; | 30 class ListValue; |
| 30 } | 31 } |
| 31 | 32 |
| 32 // WebUI message handler for the help page. | 33 // WebUI message handler for the help page. |
| 33 class HelpHandler : public content::WebUIMessageHandler, | 34 class HelpHandler : public content::WebUIMessageHandler, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // text has been found. | 109 // text has been found. |
| 109 void OnRegulatoryLabelDirFound(const base::FilePath& path); | 110 void OnRegulatoryLabelDirFound(const base::FilePath& path); |
| 110 | 111 |
| 111 // Callback for setting the regulatory label source. | 112 // Callback for setting the regulatory label source. |
| 112 void OnRegulatoryLabelImageFound(const base::FilePath& path); | 113 void OnRegulatoryLabelImageFound(const base::FilePath& path); |
| 113 | 114 |
| 114 // Callback for setting the regulatory label alt text. | 115 // Callback for setting the regulatory label alt text. |
| 115 void OnRegulatoryLabelTextRead(const std::string& text); | 116 void OnRegulatoryLabelTextRead(const std::string& text); |
| 116 | 117 |
| 117 // Callback for setting the eol string text. | 118 // Callback for setting the eol string text. |
| 118 void OnEolStatus(const int status); | 119 void OnEolStatus(update_engine::EndOfLifeStatus status); |
| 119 #endif | 120 #endif |
| 120 | 121 |
| 121 // Specialized instance of the VersionUpdater used to update the browser. | 122 // Specialized instance of the VersionUpdater used to update the browser. |
| 122 std::unique_ptr<VersionUpdater> version_updater_; | 123 std::unique_ptr<VersionUpdater> version_updater_; |
| 123 | 124 |
| 124 // Used to observe notifications. | 125 // Used to observe notifications. |
| 125 content::NotificationRegistrar registrar_; | 126 content::NotificationRegistrar registrar_; |
| 126 | 127 |
| 127 // Used to observe changes in the |kDeviceAutoUpdateDisabled| policy. | 128 // Used to observe changes in the |kDeviceAutoUpdateDisabled| policy. |
| 128 policy::PolicyChangeRegistrar policy_registrar_; | 129 policy::PolicyChangeRegistrar policy_registrar_; |
| 129 | 130 |
| 130 // Used for callbacks. | 131 // Used for callbacks. |
| 131 base::WeakPtrFactory<HelpHandler> weak_factory_; | 132 base::WeakPtrFactory<HelpHandler> weak_factory_; |
| 132 | 133 |
| 133 DISALLOW_COPY_AND_ASSIGN(HelpHandler); | 134 DISALLOW_COPY_AND_ASSIGN(HelpHandler); |
| 134 }; | 135 }; |
| 135 | 136 |
| 136 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ | 137 #endif // CHROME_BROWSER_UI_WEBUI_HELP_HELP_HANDLER_H_ |
| OLD | NEW |