OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_IA_WIN_H_ | 5 #ifndef CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_IA_WIN_H_ |
6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_IA_WIN_H_ | 6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_IA_WIN_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/browser/power_profiler/power_data_provider.h" | 9 #include "content/browser/power_profiler/power_data_provider.h" |
10 #include "third_party/power_gadget/PowerGadgetLib.h" | 10 #include "third_party/power_gadget/PowerGadgetLib.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 // A class used to get power usage via Power Gadget API. | 14 // A class used to get power usage via Power Gadget API. |
15 class PowerDataProviderIA : public PowerDataProvider { | 15 class PowerDataProviderIA : public PowerDataProvider { |
16 public: | 16 public: |
17 PowerDataProviderIA(); | 17 PowerDataProviderIA(); |
18 | 18 |
19 virtual ~PowerDataProviderIA(); | 19 virtual ~PowerDataProviderIA(); |
20 | 20 |
21 bool Initialize(); | 21 bool Initialize(); |
22 virtual PowerEventVector GetData() OVERRIDE; | 22 virtual PowerEventVector GetData() OVERRIDE; |
| 23 virtual int64 SamplingRate() OVERRIDE; |
23 | 24 |
24 private: | 25 private: |
25 CIntelPowerGadgetLib energy_lib_; | 26 CIntelPowerGadgetLib energy_lib_; |
26 | 27 |
27 int sockets_number_; | 28 int sockets_number_; |
28 int power_msr_ids_[PowerEvent::ID_COUNT]; | 29 int power_msr_ids_[PowerEvent::ID_COUNT]; |
29 bool is_open_; | 30 bool is_open_; |
30 DISALLOW_COPY_AND_ASSIGN(PowerDataProviderIA); | 31 DISALLOW_COPY_AND_ASSIGN(PowerDataProviderIA); |
31 }; | 32 }; |
32 | 33 |
33 } // namespace content | 34 } // namespace content |
34 | 35 |
35 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_IA_WIN_H_ | 36 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_IA_WIN_H_ |
OLD | NEW |