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

mercurial