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