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 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, NestedUpTo=inside_cpow, 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,
79 async EnableWakeLockNotifications();
80 async DisableWakeLockNotifications();
81 sync GetWakeLockInfo(nsString aTopic)
82 returns (WakeLockInformation aWakeLockInfo);
84 async LockScreenOrientation(ScreenOrientation aOrientation)
85 returns (nsresult result);
86 async UnlockScreenOrientation();
89 async NotifySensorChange(SensorData aSensorData);
92 async EnableSensorNotifications(SensorType aSensor);
93 async DisableSensorNotifications(SensorType aSensor);
99 } // namespace mozilla