Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5514)

Unified Diff: chrome/common/extensions/api/experimental_system_info_cpu.idl

Issue 10914060: Refine systemInfo.cpu API defintions and provide systemInfo.cpu.get impl for Windows and Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/experimental_system_info_cpu.idl
diff --git a/chrome/common/extensions/api/experimental_system_info_cpu.idl b/chrome/common/extensions/api/experimental_system_info_cpu.idl
index 16c74027dbb7af1158f1972078a8a1bd12f2804c..6bb1a78d75f16ed489ca329fb1cff7c17daba9fe 100644
--- a/chrome/common/extensions/api/experimental_system_info_cpu.idl
+++ b/chrome/common/extensions/api/experimental_system_info_cpu.idl
@@ -5,21 +5,27 @@
// File-level comment to appease parser. Eventually this will not be necessary.
namespace experimental.systemInfo.cpu {
- dictionary CpuCoreInfo {
- // Indicates the load of CPU core, as a number between 0 and 100.
- long load;
- };
-
dictionary CpuInfo {
- // The array of the CPU processors in the system.
- CpuCoreInfo[] cores;
+ // The number of logical processors.
+ long numOfProcessors;
+ // The architecture name of the processors.
+ DOMString archName;
+ // The model name of the processors.
+ DOMString modelName;
+ };
+
+ dictionary CpuUpdateInfo {
+ // The average usage percent of all processors, as a number
+ // between 0 and 100.
+ double averageUsage;
+ // The CPU usage array for each logic processor.
+ double[] usagesPerProcessor;
Mihai Parparita -not on Chrome 2012/09/05 23:58:39 Nit: usagePerProcessor is more correct.
Hongbo Min 2012/09/06 01:43:53 Done.
};
- callback CpuInfoCallback = void (CpuInfo prop);
- callback CpuUpdateCallback = void (ChangeInfo info);
+ callback CpuInfoCallback = void (CpuInfo info);
interface Functions {
- // Get CPU property.
+ // Get CPU information.
static void get(CpuInfoCallback callback);
};
};

Powered by Google App Engine
This is Rietveld 408576698