Index: chrome/common/extensions/api/experimental_systeminfo_cpu.idl |
diff --git a/chrome/common/extensions/api/experimental_systeminfo_cpu.idl b/chrome/common/extensions/api/experimental_systeminfo_cpu.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..914931dd05f4f80dab5f066ad29feb9db093b840 |
--- /dev/null |
+++ b/chrome/common/extensions/api/experimental_systeminfo_cpu.idl |
@@ -0,0 +1,41 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// 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 |
Mihai Parparita -not on Chrome
2012/08/10 20:24:56
Nit: comments end with a period (applies to the wh
Hongbo Min
2012/08/12 14:22:44
Done.
|
+ long load; |
+ }; |
+ |
+ dictionary CpuInfo { |
+ // The array of the CPU processors in the system |
+ CpuCoreInfo[] cores; |
+ }; |
+ |
+ dictionary ChangeInfo { |
+ // The index of CPU core on which the load has been changed |
+ long index; |
+ // The changed load |
+ long load; |
+ }; |
+ |
+ callback CpuInfoCallback = void (CpuInfo prop); |
+ callback CpuUpdateCallback = void (ChangeInfo info); |
+ |
+ interface Functions { |
+ // Get CPU property |
+ static void get(CpuInfoCallback callback); |
+ |
+ // Set the update interval, in seconds |
+ static void setUpdateInterval(long interval); |
+ }; |
+ |
+ interface Events { |
+ // Fired when CPU info is updated. Default update interval is 1 seconds |
+ // |info| : Contains the changed information of Cpu core |
+ static void onUpdated(ChangeInfo info); |
+ }; |
+}; |