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

Unified Diff: content/common/battery_status_messages.h

Issue 10024013: chromeos: Add support for the battery status API on chromeos. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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/common/battery_status_messages.h
diff --git a/content/common/battery_status_messages.h b/content/common/battery_status_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..7288b1034433d7506b25977ed5715b4a93f83afa
--- /dev/null
+++ b/content/common/battery_status_messages.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 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.
+
+// IPC messages for battery status api.
+// Multiply-included message file, hence no include guard.
+
+#include "ipc/ipc_message_macros.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebBatteryStatus.h"
+
+#define IPC_MESSAGE_START BatteryStatusMsgStart
+
+IPC_STRUCT_TRAITS_BEGIN(WebKit::WebBatteryStatus)
+ IPC_STRUCT_TRAITS_MEMBER(charging)
+ IPC_STRUCT_TRAITS_MEMBER(chargingTime)
+ IPC_STRUCT_TRAITS_MEMBER(dischargingTime)
+ IPC_STRUCT_TRAITS_MEMBER(level)
+IPC_STRUCT_TRAITS_END()
+
+// Messages sent from the renderer to the browser.
+
+// Asks the browser process to start or stop sending battery status updates.
+IPC_MESSAGE_CONTROL1(BatteryStatusHostMsg_StartUpdating,
+ int /* render_view_id */)
+
+IPC_MESSAGE_CONTROL1(BatteryStatusHostMsg_StopUpdating,
+ int /* render_view_id */)
+
+// Messages sent from the browser to the renderer.
+
+// Sends the battery-status update to the renderer.
+IPC_MESSAGE_ROUTED1(BatteryStatusMsg_Updated,
+ WebKit::WebBatteryStatus)

Powered by Google App Engine
This is Rietveld 408576698