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

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

Issue 10830240: Add the implementation skeleton for systeminfo.cpu API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: First reviewing cycle Created 8 years, 4 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
new file mode 100644
index 0000000000000000000000000000000000000000..83393adacee19bb199bcde4cf0694c38a8e6343c
--- /dev/null
+++ b/chrome/common/extensions/api/experimental_system_info_cpu.idl
@@ -0,0 +1,38 @@
+// 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.
+ 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);
+ };
+
+ interface Events {
Mihai Parparita -not on Chrome 2012/08/13 23:55:07 Remove events from the IDL, since they're not impl
+ // 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);
+ };
+};

Powered by Google App Engine
This is Rietveld 408576698