Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* vim: set sw=2 ts=8 et ft=cpp : */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef mozilla_HalInternal_h |
michael@0 | 8 | #define mozilla_HalInternal_h 1 |
michael@0 | 9 | |
michael@0 | 10 | /* |
michael@0 | 11 | * This file is included by HalImpl.h and HalSandbox.h with a mechanism similar |
michael@0 | 12 | * to Hal.h. That means those headers set MOZ_HAL_NAMESPACE to specify in which |
michael@0 | 13 | * namespace the internal functions should appear. |
michael@0 | 14 | * |
michael@0 | 15 | * The difference between Hal.h and HalInternal.h is that methods declared in |
michael@0 | 16 | * HalInternal.h don't appear in the hal namespace. That also means this file |
michael@0 | 17 | * should not be included except by HalInternal.h and HalSandbox.h. |
michael@0 | 18 | */ |
michael@0 | 19 | |
michael@0 | 20 | #ifndef MOZ_HAL_NAMESPACE |
michael@0 | 21 | # error "You shouldn't directly include HalInternal.h!" |
michael@0 | 22 | #endif |
michael@0 | 23 | |
michael@0 | 24 | namespace mozilla { |
michael@0 | 25 | namespace MOZ_HAL_NAMESPACE { |
michael@0 | 26 | |
michael@0 | 27 | /** |
michael@0 | 28 | * Enables battery notifications from the backend. |
michael@0 | 29 | */ |
michael@0 | 30 | void EnableBatteryNotifications(); |
michael@0 | 31 | |
michael@0 | 32 | /** |
michael@0 | 33 | * Disables battery notifications from the backend. |
michael@0 | 34 | */ |
michael@0 | 35 | void DisableBatteryNotifications(); |
michael@0 | 36 | |
michael@0 | 37 | /** |
michael@0 | 38 | * Enables network notifications from the backend. |
michael@0 | 39 | */ |
michael@0 | 40 | void EnableNetworkNotifications(); |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * Disables network notifications from the backend. |
michael@0 | 44 | */ |
michael@0 | 45 | void DisableNetworkNotifications(); |
michael@0 | 46 | |
michael@0 | 47 | /** |
michael@0 | 48 | * Enables screen orientation notifications from the backend. |
michael@0 | 49 | */ |
michael@0 | 50 | void EnableScreenConfigurationNotifications(); |
michael@0 | 51 | |
michael@0 | 52 | /** |
michael@0 | 53 | * Disables screen orientation notifications from the backend. |
michael@0 | 54 | */ |
michael@0 | 55 | void DisableScreenConfigurationNotifications(); |
michael@0 | 56 | |
michael@0 | 57 | /** |
michael@0 | 58 | * Enable switch notifications from the backend |
michael@0 | 59 | */ |
michael@0 | 60 | void EnableSwitchNotifications(hal::SwitchDevice aDevice); |
michael@0 | 61 | |
michael@0 | 62 | /** |
michael@0 | 63 | * Disable switch notifications from the backend |
michael@0 | 64 | */ |
michael@0 | 65 | void DisableSwitchNotifications(hal::SwitchDevice aDevice); |
michael@0 | 66 | |
michael@0 | 67 | /** |
michael@0 | 68 | * Enable alarm notifications from the backend. |
michael@0 | 69 | */ |
michael@0 | 70 | bool EnableAlarm(); |
michael@0 | 71 | |
michael@0 | 72 | /** |
michael@0 | 73 | * Disable alarm notifications from the backend. |
michael@0 | 74 | */ |
michael@0 | 75 | void DisableAlarm(); |
michael@0 | 76 | |
michael@0 | 77 | /** |
michael@0 | 78 | * Enable system clock change notifications from the backend. |
michael@0 | 79 | */ |
michael@0 | 80 | void EnableSystemClockChangeNotifications(); |
michael@0 | 81 | |
michael@0 | 82 | /** |
michael@0 | 83 | * Disable system clock change notifications from the backend. |
michael@0 | 84 | */ |
michael@0 | 85 | void DisableSystemClockChangeNotifications(); |
michael@0 | 86 | |
michael@0 | 87 | /** |
michael@0 | 88 | * Enable system timezone change notifications from the backend. |
michael@0 | 89 | */ |
michael@0 | 90 | void EnableSystemTimezoneChangeNotifications(); |
michael@0 | 91 | |
michael@0 | 92 | /** |
michael@0 | 93 | * Disable system timezone change notifications from the backend. |
michael@0 | 94 | */ |
michael@0 | 95 | void DisableSystemTimezoneChangeNotifications(); |
michael@0 | 96 | |
michael@0 | 97 | /** |
michael@0 | 98 | * Has the child-side HAL IPC object been destroyed? If so, you shouldn't send |
michael@0 | 99 | * messages to hal_sandbox. |
michael@0 | 100 | */ |
michael@0 | 101 | bool HalChildDestroyed(); |
michael@0 | 102 | } // namespace MOZ_HAL_NAMESPACE |
michael@0 | 103 | } // namespace mozilla |
michael@0 | 104 | |
michael@0 | 105 | #endif // mozilla_HalInternal_h |