Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1571)

Unified Diff: content/public/browser/power_profiler_observer.h

Issue 140583003: Chrome power profiler service (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/power_profiler_observer.h
diff --git a/content/public/browser/power_profiler_observer.h b/content/public/browser/power_profiler_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f6915fbebe55f24936c2d8c456d1eb04e661cfe
--- /dev/null
+++ b/content/public/browser/power_profiler_observer.h
@@ -0,0 +1,40 @@
+// 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_PUBLIC_BROWSER_POWER_PROFILER_OBSERVER_H_
+#define CONTENT_PUBLIC_BROWSER_POWER_PROFILER_OBSERVER_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "content/public/browser/power_data_provider.h"
+
+namespace content {
+
+// A class used to monitor the power usage and tell profiler the power data
+class CONTENT_EXPORT PowerProfilerObserver {
+ public:
+ enum Resolution {
+ LOW,
+ NORMAL,
+ HIGH,
+ TYPE_COUNT // this should be always the last one
+ };
+
+ PowerProfilerObserver() {}
+ virtual ~PowerProfilerObserver() {}
+
+ // This method should be called on UI thread
+ virtual void OnPowerEvent(const PowerEvent&) = 0;
+
+ // Return resolution of an observer.
+ virtual Resolution resolution() const = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PowerProfilerObserver);
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_POWER_PROFILER_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698