Index: content/browser/power_profiler/power_profiler_helper.h |
diff --git a/content/browser/power_profiler/power_profiler_helper.h b/content/browser/power_profiler/power_profiler_helper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..370e78b3de7bd6c75b6503a01034888e4c62d7cc |
--- /dev/null |
+++ b/content/browser/power_profiler/power_profiler_helper.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2013 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. |
+ |
+#ifndef CONTENT_BROWSER_POWER_PROFILER_HELPER_H_ |
+#define CONTENT_BROWSER_POWER_PROFILER_HELPER_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "content/browser/power_profiler/power_event.h" |
+ |
+namespace content { |
+ |
+// A class used to GET power usage |
+class PowerProfilerHelper : public base::RefCounted<PowerProfilerHelper>{ |
pfeldman
2014/01/09 11:38:58
"Helper" is not a useful suffix. What does it do?
qsr
2014/01/17 11:50:14
PowerDataProvider could be a better choice.
|
+ public: |
+ virtual ~PowerProfilerHelper() { } |
+ |
+ // Initialized power profiler helper via platform specific libs |
+ virtual bool Initialize() = 0; |
+ |
+ // reset resolution of power profile driver. |
pfeldman
2014/01/09 11:38:58
Start with capital letters.
|
+ // Is it worthy to expose to app level? |
+ virtual void Reset(size_t) = 0; |
+ |
+ // return the number of events read on success, or -1 in case of an error |
+ // data is the buffer to store power event, |
pfeldman
2014/01/09 11:38:58
|data|
|
+ // energies is the buffer to store energy interval |
+ // count is the buffer length |
+ virtual int GetData(PowerEvent* data, double* energies, int count) = 0; |
+ |
+ protected: |
+ PowerProfilerHelper() { } |
+ |
+ private: |
+ friend class PowerProfilerHelperFactory; |
+ DISALLOW_COPY_AND_ASSIGN(PowerProfilerHelper); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_POWER_PROFILER_HELPER_H_ |