accessible/src/base/Platform.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=2 et sw=2 tw=80: */
     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 namespace mozilla {
     8 namespace a11y {
    10 enum EPlatformDisabledState {
    11   ePlatformIsForceEnabled = -1,
    12   ePlatformIsEnabled = 0,
    13   ePlatformIsDisabled = 1
    14 };
    16 /**
    17  * Return the platform disabled state.
    18  */
    19 EPlatformDisabledState PlatformDisabledState();
    21 #ifdef MOZ_ACCESSIBILITY_ATK
    22 /**
    23  * Perform initialization that should be done as soon as possible, in order
    24  * to minimize startup time.
    25  * XXX: this function and the next defined in ApplicationAccessibleWrap.cpp
    26  */
    27 void PreInit();
    28 #endif
    30 #if defined(MOZ_ACCESSIBILITY_ATK) || defined(XP_MACOSX)
    31 /**
    32  * Is platform accessibility enabled.
    33  * Only used on linux with atk and MacOS for now.
    34  */
    35 bool ShouldA11yBeEnabled();
    36 #endif
    38 /**
    39  * Called to initialize platform specific accessibility support.
    40  * Note this is called after internal accessibility support is initialized.
    41  */
    42 void PlatformInit();
    44 /**
    45  * Shutdown platform accessibility.
    46  * Note this is called before internal accessibility support is shutdown.
    47  */
    48 void PlatformShutdown();
    50 } // namespace a11y
    51 } // namespace mozilla

mercurial