Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 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 | |
| 5 #ifndef CONTENT_BROWSER_POWER_PROFILER_HELPER_H_ | |
| 6 #define CONTENT_BROWSER_POWER_PROFILER_HELPER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "content/browser/power_profiler/power_event.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 // A class used to GET power usage | |
| 15 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.
| |
| 16 public: | |
| 17 virtual ~PowerProfilerHelper() { } | |
| 18 | |
| 19 // Initialized power profiler helper via platform specific libs | |
| 20 virtual bool Initialize() = 0; | |
| 21 | |
| 22 // reset resolution of power profile driver. | |
|
pfeldman
2014/01/09 11:38:58
Start with capital letters.
| |
| 23 // Is it worthy to expose to app level? | |
| 24 virtual void Reset(size_t) = 0; | |
| 25 | |
| 26 // return the number of events read on success, or -1 in case of an error | |
| 27 // data is the buffer to store power event, | |
|
pfeldman
2014/01/09 11:38:58
|data|
| |
| 28 // energies is the buffer to store energy interval | |
| 29 // count is the buffer length | |
| 30 virtual int GetData(PowerEvent* data, double* energies, int count) = 0; | |
| 31 | |
| 32 protected: | |
| 33 PowerProfilerHelper() { } | |
| 34 | |
| 35 private: | |
| 36 friend class PowerProfilerHelperFactory; | |
| 37 DISALLOW_COPY_AND_ASSIGN(PowerProfilerHelper); | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_BROWSER_POWER_PROFILER_HELPER_H_ | |
| OLD | NEW |