| 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_VERSION_HANDLER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/ui/webui/version_handler.h" | 12 #include "chrome/browser/ui/webui/version_handler.h" |
| 13 #include "chromeos/system/version_loader.h" | 13 #include "chromeos/system/version_loader.h" |
| 14 | 14 |
| 15 // VersionHandlerChromeOS is responsible for loading the Chrome OS | 15 // VersionHandlerChromeOS is responsible for loading the Chrome OS |
| 16 // version. | 16 // version. |
| 17 class VersionHandlerChromeOS : public VersionHandler { | 17 class VersionHandlerChromeOS : public VersionHandler { |
| 18 public: | 18 public: |
| 19 VersionHandlerChromeOS(); | 19 VersionHandlerChromeOS(); |
| 20 ~VersionHandlerChromeOS() override; | 20 ~VersionHandlerChromeOS() override; |
| 21 | 21 |
| 22 // VersionHandler overrides: | 22 // VersionHandler overrides: |
| 23 void HandleRequestVersionInfo(const base::ListValue* args) override; | 23 void HandleRequestVersionInfo(const base::ListValue* args) override; |
| 24 | 24 |
| 25 // Callbacks from chromeos::VersionLoader. | 25 // Callbacks from chromeos::VersionLoader. |
| 26 void OnVersion(const std::string& version); | 26 void OnVersion(const std::string& version); |
| 27 void OnOSFirmware(const std::string& version); |
| 27 void OnARCVersion(const std::string& version); | 28 void OnARCVersion(const std::string& version); |
| 28 | 29 |
| 29 private: | 30 private: |
| 30 base::WeakPtrFactory<VersionHandlerChromeOS> weak_factory_; | 31 base::WeakPtrFactory<VersionHandlerChromeOS> weak_factory_; |
| 31 | 32 |
| 32 DISALLOW_COPY_AND_ASSIGN(VersionHandlerChromeOS); | 33 DISALLOW_COPY_AND_ASSIGN(VersionHandlerChromeOS); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 #endif // CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_CHROMEOS_H_ | 36 #endif // CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_CHROMEOS_H_ |
| OLD | NEW |