Blink roll 174933:174969
[chromium-blink-merge.git] / content / common / battery_status_messages.h
blobdd09ed0ca240a617fee81720cddf378c3d694e52
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // IPC messages for Battery Status API.
6 // Multiply-included message file, hence no include guard.
8 #include "ipc/ipc_message_macros.h"
9 #include "third_party/WebKit/public/platform/WebBatteryStatus.h"
11 #undef IPC_MESSAGE_EXPORT
12 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
13 #define IPC_MESSAGE_START BatteryStatusMsgStart
15 IPC_STRUCT_TRAITS_BEGIN(blink::WebBatteryStatus)
16 IPC_STRUCT_TRAITS_MEMBER(charging)
17 IPC_STRUCT_TRAITS_MEMBER(chargingTime)
18 IPC_STRUCT_TRAITS_MEMBER(dischargingTime)
19 IPC_STRUCT_TRAITS_MEMBER(level)
20 IPC_STRUCT_TRAITS_END()
22 // Notifies the browser process that the renderer process wants
23 // to listen to battery status updates.
24 IPC_MESSAGE_CONTROL0(BatteryStatusHostMsg_Start)
26 // Notifies the render process with new battery status data.
27 IPC_MESSAGE_CONTROL1(BatteryStatusMsg_DidChange,
28 blink::WebBatteryStatus /* new status */)
30 // Notifies the browser process that the renderer process is not using the
31 // battery status data anymore.
32 IPC_MESSAGE_CONTROL0(BatteryStatusHostMsg_Stop)