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

Side by Side Diff: chrome/browser/extensions/api/systeminfo_cpu/systeminfo_cpu_api.h

Issue 10830240: Add the implementation skeleton for systeminfo.cpu API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated patch 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEMINFO_CPU_SYSTEMINFO_CPU_API_H_
5 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEMINFO_CPU_SYSTEMINFO_CPU_API_H_
6
7 #include "chrome/browser/extensions/extension_function.h"
8
9 namespace extensions {
10
11 class CpuInfoProvider;
12
13 class SysteminfoCpuGetFunction : public AsyncExtensionFunction {
14 public:
15 DECLARE_EXTENSION_FUNCTION_NAME("experimental.systeminfo.cpu.get");
Mihai Parparita -not on Chrome 2012/08/10 20:24:56 Can you capitalize the "info" in "systeminfo" (and
Hongbo Min 2012/08/12 14:22:44 Done.
16 SysteminfoCpuGetFunction();
17 virtual ~SysteminfoCpuGetFunction();
18
19 private:
20 virtual bool RunImpl() OVERRIDE;
21 void WorkOnFileThread();
22 void RespondOnUIThread(bool success);
23 void GetCpuInfoOnFileThread();
24
25 // The CpuInfoProvider instance, lives on FILE thread.
26 CpuInfoProvider* provider_;
27 };
28
29 class SysteminfoCpuSetUpdateIntervalFunction : public AsyncExtensionFunction {
Mihai Parparita -not on Chrome 2012/08/10 20:24:56 If this is a no-op, can you remove this from the C
Hongbo Min 2012/08/12 14:22:44 Remove setUpdateInterval from cc and idl file. Do
30 public:
31 DECLARE_EXTENSION_FUNCTION_NAME("experimental.systeminfo.cpu.get");
32 SysteminfoCpuSetUpdateIntervalFunction() {}
33 virtual ~SysteminfoCpuSetUpdateIntervalFunction() {}
34
35 private:
36 virtual bool RunImpl() OVERRIDE {
37 // TODO(hmin): not implemented yet
38 return false;
39 }
40 };
41
42 } // namespace extensions
43
44 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEMINFO_CPU_SYSTEMINFO_CPU_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698