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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ | 4 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ |
5 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ | 5 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ |
6 | 6 |
| 7 #include "chrome/browser/extensions/system_info_provider.h" |
7 #include "chrome/common/extensions/api/experimental_system_info_cpu.h" | 8 #include "chrome/common/extensions/api/experimental_system_info_cpu.h" |
8 | 9 |
9 namespace extensions { | 10 namespace extensions { |
10 | 11 |
11 // An interface for retrieving cpu information on different platforms. | 12 typedef SystemInfoProvider<api::experimental_system_info_cpu::CpuInfo> |
12 class CpuInfoProvider { | 13 CpuInfoProvider; |
13 public: | |
14 // Return a CpuInfoProvider instance. The caller is responsible for | |
15 // releasing it. | |
16 static CpuInfoProvider* Create(); | |
17 | |
18 virtual ~CpuInfoProvider() {} | |
19 | |
20 // Return true if succeed to get CPU information, otherwise return false. | |
21 // Should be implemented on different platforms. | |
22 virtual bool GetCpuInfo( | |
23 api::experimental_system_info_cpu::CpuInfo* info) = 0; | |
24 }; | |
25 | 14 |
26 } // namespace extensions | 15 } // namespace extensions |
| 16 |
27 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ | 17 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_CPU_CPU_INFO_PROVIDER_H_ |
| 18 |
OLD | NEW |