Chromium Code Reviews| Index: content/browser/power_profiler/power_profiler_observer.h |
| diff --git a/content/browser/power_profiler/power_profiler_observer.h b/content/browser/power_profiler/power_profiler_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fa56d8bc1a68f7c6d04b2a792394f4e7dfcaec60 |
| --- /dev/null |
| +++ b/content/browser/power_profiler/power_profiler_observer.h |
| @@ -0,0 +1,33 @@ |
| +// 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_PROFILER_OBSERVER_H_ |
| +#define CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_OBSERVER_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +struct PowerEvent; |
| +typedef std::vector<PowerEvent> PowerEventVector; |
| + |
| +// A class used to monitor the power usage and tell profiler the power data |
|
jeremy
2014/02/16 14:09:19
nit: . at end of comment.
Pan
2014/02/17 03:17:15
Done.
|
| +class CONTENT_EXPORT PowerProfilerObserver { |
| + public: |
| + PowerProfilerObserver() {} |
| + virtual ~PowerProfilerObserver() {} |
| + |
| + // This method will be called on UI thread |
|
jeremy
2014/02/16 14:09:19
nit: the UI thread.
Pan
2014/02/17 03:17:15
Done.
|
| + virtual void OnPowerEvent(const PowerEventVector&) = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(PowerProfilerObserver); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_POWER_PROFILER_POWER_PROFILER_OBSERVER_H_ |