1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et ft=cpp : */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 include protocol PContent;
8 include protocol PBrowser;
10 include "mozilla/dom/ReferrerInfoUtils.h";
11 include "mozilla/GfxMessageUtils.h";
13 using mozilla::hal::ScreenOrientation from "mozilla/HalIPCUtils.h";
14 using mozilla::hal::SensorType from "mozilla/HalSensor.h";
15 using mozilla::hal::WakeLockControl from "mozilla/HalTypes.h";
16 using mozilla::hal::ProcessPriority from "mozilla/HalTypes.h";
17 using nsIntRect from "nsRect.h";
18 using PRTime from "prtime.h";
23 struct BatteryInformation {
35 struct NetworkInformation {
41 struct WakeLockInformation {
45 uint64_t[] lockingProcesses;
50 namespace hal_sandbox {
52 [ManualDealloc, ChildImpl=virtual, ParentImpl=virtual]
57 async NotifyBatteryChange(BatteryInformation aBatteryInfo);
58 async NotifyNetworkChange(NetworkInformation aNetworkInfo);
59 async NotifyWakeLockChange(WakeLockInformation aWakeLockInfo);
62 async Vibrate(uint32_t[] pattern, uint64_t[] id, PBrowser browser);
63 async CancelVibrate(uint64_t[] id, PBrowser browser);
65 async EnableBatteryNotifications();
66 async DisableBatteryNotifications();
67 sync GetCurrentBatteryInformation()
68 returns (BatteryInformation aBatteryInfo);
70 async EnableNetworkNotifications();
71 async DisableNetworkNotifications();
72 sync GetCurrentNetworkInformation()
73 returns (NetworkInformation aNetworkInfo);
75 async ModifyWakeLock(nsString aTopic,
76 WakeLockControl aLockAdjust,
77 WakeLockControl aHiddenAdjust);
78 async EnableWakeLockNotifications();
79 async DisableWakeLockNotifications();
80 sync GetWakeLockInfo(nsString aTopic)
81 returns (WakeLockInformation aWakeLockInfo);
83 async LockScreenOrientation(ScreenOrientation aOrientation)
84 returns (nsresult result);
85 async UnlockScreenOrientation();
88 async NotifySensorChange(SensorData aSensorData);
91 async EnableSensorNotifications(SensorType aSensor);
92 async DisableSensorNotifications(SensorType aSensor);
98 } // namespace mozilla