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

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

Issue 436683002: Battery Status API: implementation for Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed comments 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_linux.h
diff --git a/content/browser/battery_status/battery_status_manager_linux.h b/content/browser/battery_status/battery_status_manager_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..012e85b629c9edf542599cbcf6dbfb84cfd48454
--- /dev/null
+++ b/content/browser/battery_status/battery_status_manager_linux.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 CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_LINUX_H_
+#define CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_LINUX_H_
+
+#include "content/browser/battery_status/battery_status_manager.h"
+#include "content/common/content_export.h"
+
+namespace base {
+class DictionaryValue;
+}
+
+namespace content {
+
+// State reflects the possible UPower.Device.State values,
+// see upower.freedesktop.org/docs/Device.html#Device:State.
+enum UPowerDeviceState {
+ UPOWER_DEVICE_STATE_UNKNOWN = 0,
+ UPOWER_DEVICE_STATE_CHARGING = 1,
+ UPOWER_DEVICE_STATE_DISCHARGING = 2,
+ UPOWER_DEVICE_STATE_EMPTY = 3,
+ UPOWER_DEVICE_STATE_FULL = 4,
+ UPOWER_DEVICE_STATE_PENDING_CHARGE = 5,
+ UPOWER_DEVICE_STATE_PENDING_DISCHARGE = 6,
+};
+
+CONTENT_EXPORT void ComputeWebBatteryStatus(
Michael van Ouwerkerk 2014/08/08 14:54:59 Why does this need CONTENT_EXPORT?
mlamouri (slow - plz ping) 2014/08/08 17:31:00 To be used in the unit test I presume.
timvolodine 2014/08/08 18:46:45 On 2014/08/08 14:54:59, Michael van Ouwerkerk wrot
timvolodine 2014/08/08 18:46:45 yes, unittests are a separate library so need to e
+ const base::DictionaryValue& dictionary, blink::WebBatteryStatus& status);
mlamouri (slow - plz ping) 2014/08/07 16:17:04 Could you add a comment describing what this is do
timvolodine 2014/08/08 18:46:45 Done.
+
+} // namespace content
+
+#endif // CHROME_BROWSER_BATTERY_STATUS_BATTERY_STATUS_MANAGER_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698