Index: content/browser/power_profiler/Intel/power_data_provider_ia.h |
diff --git a/content/browser/power_profiler/Intel/power_data_provider_ia.h b/content/browser/power_profiler/Intel/power_data_provider_ia.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..100486f1fe0f222906bad4acc46bbe4c58e8f3dc |
--- /dev/null |
+++ b/content/browser/power_profiler/Intel/power_data_provider_ia.h |
@@ -0,0 +1,44 @@ |
+// 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_DATA_PROVIDER_IA_H_ |
+#define CONTENT_BROWSER_POWER_DATA_PROVIDER_IA_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/memory/ref_counted.h" |
+#include "content/public/browser/power_data_provider.h" |
+ |
+ |
+#if defined(OS_WIN) |
+#include "third_party/power_gadget/IntelPowerGadgetLib.h" |
+#endif // !OS_WIN |
+ |
+namespace content { |
+ |
+// A class used to GET power usage via Power Gadget API |
+class PowerDataProviderIA : public PowerDataProvider { |
+ public: |
+ virtual ~PowerDataProviderIA(); |
+ |
+ virtual bool Initialize(); |
+ virtual bool GetData(PowerEvent* data) OVERRIDE; |
+ |
+ protected: |
+ PowerDataProviderIA(); |
+ |
+ private: |
+ friend class PowerDataProviderFactory; |
+ |
+#if defined(OS_WIN) |
+ CIntelPowerGadgetLib energy_lib_; |
+#endif |
+ int sockets_number_; |
+ int power_msr_ids_[PowerEvent::ID_COUNT]; |
+ bool is_open_; |
+ DISALLOW_COPY_AND_ASSIGN(PowerDataProviderIA); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_POWER_DATA_PROVIDER_IA_H_ |