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.
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 #ifndef _AtkSocketAccessible_H_
8 #define _AtkSocketAccessible_H_
10 #include "AccessibleWrap.h"
12 // This file gets included by nsAccessibilityService.cpp, which can't include
13 // atk.h (or glib.h), so we can't rely on it being included.
14 #ifdef __ATK_H__
15 extern "C" typedef void (*AtkSocketEmbedType) (AtkSocket*, gchar*);
16 #else
17 extern "C" typedef void (*AtkSocketEmbedType) (void*, void*);
18 #endif
20 namespace mozilla {
21 namespace a11y {
23 /**
24 * Provides a AccessibleWrap wrapper around AtkSocket for out-of-process
25 * accessibles.
26 */
27 class AtkSocketAccessible : public AccessibleWrap
28 {
29 public:
31 // Soft references to AtkSocket
32 static AtkSocketEmbedType g_atk_socket_embed;
33 #ifdef __ATK_H__
34 static GType g_atk_socket_type;
35 #endif
36 static const char* sATKSocketEmbedSymbol;
37 static const char* sATKSocketGetTypeSymbol;
39 /*
40 * True if the current Atk version supports AtkSocket and it was correctly
41 * loaded.
42 */
43 static bool gCanEmbed;
45 AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc,
46 const nsCString& aPlugId);
48 virtual void Shutdown();
50 // nsIAccessible
51 NS_IMETHODIMP GetNativeInterface(void** aOutAccessible);
52 };
54 } // namespace a11y
55 } // namespace mozilla
57 #endif