accessible/src/atk/nsMai.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.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* vim: set ts=2 et sw=2 tw=80: */
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 __NS_MAI_H__
michael@0 8 #define __NS_MAI_H__
michael@0 9
michael@0 10 #include <atk/atk.h>
michael@0 11 #include <glib.h>
michael@0 12 #include <glib-object.h>
michael@0 13
michael@0 14 #include "AccessibleWrap.h"
michael@0 15
michael@0 16 #define MAI_TYPE_ATK_OBJECT (mai_atk_object_get_type ())
michael@0 17 #define MAI_ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
michael@0 18 MAI_TYPE_ATK_OBJECT, MaiAtkObject))
michael@0 19 #define MAI_ATK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
michael@0 20 MAI_TYPE_ATK_OBJECT, \
michael@0 21 MaiAtkObjectClass))
michael@0 22 #define IS_MAI_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
michael@0 23 MAI_TYPE_ATK_OBJECT))
michael@0 24 #define IS_MAI_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
michael@0 25 MAI_TYPE_ATK_OBJECT))
michael@0 26 #define MAI_ATK_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
michael@0 27 MAI_TYPE_ATK_OBJECT, \
michael@0 28 MaiAtkObjectClass))
michael@0 29 GType mai_atk_object_get_type(void);
michael@0 30 GType mai_util_get_type();
michael@0 31 mozilla::a11y::AccessibleWrap* GetAccessibleWrap(AtkObject* aAtkObj);
michael@0 32
michael@0 33 extern int atkMajorVersion, atkMinorVersion;
michael@0 34
michael@0 35 /**
michael@0 36 * Return true if the loaded version of libatk-1.0.so is at least
michael@0 37 * aMajor.aMinor.0.
michael@0 38 */
michael@0 39 static inline bool
michael@0 40 IsAtkVersionAtLeast(int aMajor, int aMinor)
michael@0 41 {
michael@0 42 return aMajor < atkMajorVersion ||
michael@0 43 (aMajor == atkMajorVersion && aMinor <= atkMinorVersion);
michael@0 44 }
michael@0 45
michael@0 46 #endif /* __NS_MAI_H__ */

mercurial