blob: 85f67e7f5fb9a048c45eab8cf5cea4fe457a5d54 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// Copyright 2014 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_PROFILER_POWER_DATA_PROVIDER_H_
#define CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_
#include <vector>
#include "base/memory/scoped_ptr.h"
#include "content/browser/power_profiler/power_event.h"
namespace base {
class TimeDelta;
} // namespace base
namespace content {
typedef std::vector<PowerEvent> PowerEventVector;
// A class used to get power usage.
class PowerDataProvider {
public:
static scoped_ptr<PowerDataProvider> Create();
PowerDataProvider() {}
virtual ~PowerDataProvider() {}
// Returns a vector of power events, one per type, for the types it supports.
virtual PowerEventVector GetData() = 0;
// Returns sampling rate at which the provider can operate.
virtual base::TimeDelta GetSamplingRate() = 0;
};
} // namespace content
#endif // CONTENT_BROWSER_POWER_PROFILER_POWER_DATA_PROVIDER_H_
|