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_DATA_PROVIDER_IA_H_ |
| 6 #define CONTENT_BROWSER_POWER_DATA_PROVIDER_IA_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/public/browser/power_data_provider.h" |
| 11 |
| 12 |
| 13 #if defined(OS_WIN) |
| 14 #include "third_party/power_gadget/IntelPowerGadgetLib.h" |
| 15 #endif // !OS_WIN |
| 16 |
| 17 namespace content { |
| 18 |
| 19 // A class used to GET power usage via Power Gadget API |
| 20 class PowerDataProviderIA : public PowerDataProvider { |
| 21 public: |
| 22 virtual ~PowerDataProviderIA(); |
| 23 |
| 24 virtual bool Initialize(); |
| 25 virtual bool GetData(PowerEvent* data) OVERRIDE; |
| 26 |
| 27 protected: |
| 28 PowerDataProviderIA(); |
| 29 |
| 30 private: |
| 31 friend class PowerDataProviderFactory; |
| 32 |
| 33 #if defined(OS_WIN) |
| 34 CIntelPowerGadgetLib energy_lib_; |
| 35 #endif |
| 36 int sockets_number_; |
| 37 int power_msr_ids_[PowerEvent::ID_COUNT]; |
| 38 bool is_open_; |
| 39 DISALLOW_COPY_AND_ASSIGN(PowerDataProviderIA); |
| 40 }; |
| 41 |
| 42 } // namespace content |
| 43 |
| 44 #endif // CONTENT_BROWSER_POWER_DATA_PROVIDER_IA_H_ |
OLD | NEW |