OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_POWER_PROFILER_OBSERVER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_POWER_PROFILER_OBSERVER_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "content/public/browser/power_data_provider.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 // A class used to monitor the power usage and tell profiler the power data |
| 16 class CONTENT_EXPORT PowerProfilerObserver { |
| 17 public: |
| 18 enum Resolution { |
| 19 LOW, |
| 20 NORMAL, |
| 21 HIGH, |
| 22 TYPE_COUNT // this should be always the last one |
| 23 }; |
| 24 |
| 25 PowerProfilerObserver() {} |
| 26 virtual ~PowerProfilerObserver() {} |
| 27 |
| 28 // This method should be called on UI thread |
| 29 virtual void OnPowerEvent(const PowerEvent&) = 0; |
| 30 |
| 31 // Return resolution of an observer. |
| 32 virtual Resolution resolution() const = 0; |
| 33 |
| 34 private: |
| 35 DISALLOW_COPY_AND_ASSIGN(PowerProfilerObserver); |
| 36 }; |
| 37 |
| 38 } // namespace content |
| 39 |
| 40 #endif // CONTENT_PUBLIC_BROWSER_POWER_PROFILER_OBSERVER_H_ |
OLD | NEW |