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) |