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_H_ | 5 #ifndef CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ |
6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ | 6 #define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | |
sky
2014/06/04 15:31:48
Why do you need to add this? If it's to get base::
vivekg
2014/06/04 16:49:31
Done.
| |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "content/browser/power_profiler/power_event.h" | 12 #include "content/browser/power_profiler/power_event.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 typedef std::vector<PowerEvent> PowerEventVector; | 16 typedef std::vector<PowerEvent> PowerEventVector; |
16 | 17 |
17 // A class used to get power usage. | 18 // A class used to get power usage. |
18 class PowerDataProvider { | 19 class PowerDataProvider { |
19 public: | 20 public: |
20 static scoped_ptr<PowerDataProvider> Create(); | 21 static scoped_ptr<PowerDataProvider> Create(); |
21 | 22 |
22 PowerDataProvider() {} | 23 PowerDataProvider() {} |
23 virtual ~PowerDataProvider() {} | 24 virtual ~PowerDataProvider() {} |
24 | 25 |
25 // Returns a vector of power events, one per type, for the types it supports. | 26 // Returns a vector of power events, one per type, for the types it supports. |
26 virtual PowerEventVector GetData() = 0; | 27 virtual PowerEventVector GetData() = 0; |
28 | |
29 // Returns sampling rate at which the provider can operate. | |
30 virtual base::TimeDelta GetSamplingRate() = 0; | |
27 }; | 31 }; |
28 | 32 |
29 } // namespace content | 33 } // namespace content |
30 | 34 |
31 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ | 35 #endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_ |
OLD | NEW |