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: Objective-C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #import <Cocoa/Cocoa.h> |
michael@0 | 7 | |
michael@0 | 8 | #import "mozView.h" |
michael@0 | 9 | |
michael@0 | 10 | /* This protocol's primary use is so widget/cocoa can talk back to us |
michael@0 | 11 | properly. |
michael@0 | 12 | |
michael@0 | 13 | ChildView owns the topmost mozRootAccessible, and needs to take care of setting up |
michael@0 | 14 | that parent/child relationship. |
michael@0 | 15 | |
michael@0 | 16 | This protocol is thus used to make sure it knows it's talking to us, and not |
michael@0 | 17 | just some random |id|. |
michael@0 | 18 | */ |
michael@0 | 19 | |
michael@0 | 20 | @protocol mozAccessible |
michael@0 | 21 | |
michael@0 | 22 | // returns whether this accessible is the root accessible. there is one |
michael@0 | 23 | // root accessible per window. |
michael@0 | 24 | - (BOOL)isRoot; |
michael@0 | 25 | |
michael@0 | 26 | // some mozAccessibles implement accessibility support in place of another object. for example, |
michael@0 | 27 | // ChildView gets its support from us. |
michael@0 | 28 | // |
michael@0 | 29 | // instead of returning a mozAccessible to the OS when it wants an object, we need to pass the view we represent, so the |
michael@0 | 30 | // OS doesn't get confused and think we return some random object. |
michael@0 | 31 | - (BOOL)hasRepresentedView; |
michael@0 | 32 | - (id)representedView; |
michael@0 | 33 | |
michael@0 | 34 | #ifdef DEBUG |
michael@0 | 35 | // debug utility that will print the native accessibility tree, starting |
michael@0 | 36 | // at this node. |
michael@0 | 37 | - (void)printHierarchy; |
michael@0 | 38 | #endif |
michael@0 | 39 | |
michael@0 | 40 | /*** general ***/ |
michael@0 | 41 | |
michael@0 | 42 | // returns the accessible at the specified point. |
michael@0 | 43 | - (id)accessibilityHitTest:(NSPoint)point; |
michael@0 | 44 | |
michael@0 | 45 | // whether this element is flagged as ignored. |
michael@0 | 46 | - (BOOL)accessibilityIsIgnored; |
michael@0 | 47 | |
michael@0 | 48 | // currently focused UI element (possibly a child accessible) |
michael@0 | 49 | - (id)accessibilityFocusedUIElement; |
michael@0 | 50 | |
michael@0 | 51 | /*** attributes ***/ |
michael@0 | 52 | |
michael@0 | 53 | // all supported attributes |
michael@0 | 54 | - (NSArray*)accessibilityAttributeNames; |
michael@0 | 55 | |
michael@0 | 56 | // value for given attribute. |
michael@0 | 57 | - (id)accessibilityAttributeValue:(NSString*)attribute; |
michael@0 | 58 | |
michael@0 | 59 | // whether a particular attribute can be modified |
michael@0 | 60 | - (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute; |
michael@0 | 61 | |
michael@0 | 62 | /*** actions ***/ |
michael@0 | 63 | |
michael@0 | 64 | - (NSArray*)accessibilityActionNames; |
michael@0 | 65 | - (NSString*)accessibilityActionDescription:(NSString*)action; |
michael@0 | 66 | - (void)accessibilityPerformAction:(NSString*)action; |
michael@0 | 67 | |
michael@0 | 68 | @end |
michael@0 | 69 |