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

Unified Diff: content/browser/battery_status/battery_status_manager_win.h

Issue 447853002: Battery Status API: implementation for Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added unit tests Created 6 years, 4 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/browser/battery_status/battery_status_manager_win.h
diff --git a/content/browser/battery_status/battery_status_manager_win.h b/content/browser/battery_status/battery_status_manager_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..1acf64d0753dbdfbbb2f01df77eb4892e01709ed
--- /dev/null
+++ b/content/browser/battery_status/battery_status_manager_win.h
@@ -0,0 +1,25 @@
+// 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 CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_WIN_H_
scottmg 2014/08/13 23:39:52 nit; add \n
timvolodine 2014/08/14 15:34:34 Done.
+#define CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_WIN_H_
+
+#include <windows.h>
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebBatteryStatus.h"
+
+namespace content {
+
+enum WinACLineStatus {
+ WIN_AC_LINE_STATUS_OFFLINE = 0,
+ WIN_AC_LINE_STATUS_ONLINE = 1,
+ WIN_AC_LINE_STATUS_UNKNOWN = 255,
+};
+
+// Returns WebBatteryStatus corresponding to the given SYSTEM_POWER_STATUS.
+CONTENT_EXPORT blink::WebBatteryStatus ComputeWebBatteryStatus(
+ const SYSTEM_POWER_STATUS& win_status);
scottmg 2014/08/13 23:39:52 nit; 4s indent
timvolodine 2014/08/14 15:34:34 Done.
+
+} // namespace content
+
+#endif // CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698