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

Side by Side Diff: content/common/battery_status_messages.h

Issue 252113006: Add Battery Status API support in content/renderer and IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 7 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 unified diff | Download patch
« no previous file with comments | « content/common/DEPS ('k') | content/common/content_message_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 // IPC messages for Battery Status API.
6 // Multiply-included message file, hence no include guard.
7
8 #include "ipc/ipc_message_macros.h"
9 #include "third_party/WebKit/public/platform/WebBatteryStatus.h"
10
11 #undef IPC_MESSAGE_EXPORT
12 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
13 #define IPC_MESSAGE_START BatteryStatusMsgStart
14
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()
21
22 // Notifies the browser process that the renderer process wants
23 // to listen to battery status updates.
24 IPC_MESSAGE_CONTROL0(BatteryStatusHostMsg_Start)
25
26 // Notifies the render process with new battery status data.
27 IPC_MESSAGE_CONTROL1(BatteryStatusMsg_DidChange,
28 blink::WebBatteryStatus /* new status */)
29
30 // Notifies the browser process that the renderer process is not using the
31 // battery status data anymore.
32 IPC_MESSAGE_CONTROL0(BatteryStatusHostMsg_Stop)
OLDNEW
« no previous file with comments | « content/common/DEPS ('k') | content/common/content_message_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698