tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Platform.mm (1758B)


      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/. */
      6 
      7 #include "Platform.h"
      8 #include "RemoteAccessible.h"
      9 #include "DocAccessibleParent.h"
     10 
     11 #import "MUIAccessible.h"
     12 
     13 namespace mozilla {
     14 namespace a11y {
     15 
     16 bool ShouldA11yBeEnabled() {
     17  // XXX: Figure out proper a11y activation strategies in iOS.
     18  return true;
     19 }
     20 
     21 void PlatformInit() {}
     22 
     23 void PlatformShutdown() {}
     24 
     25 void ProxyCreated(RemoteAccessible* aProxy) {
     26  MUIAccessible* mozWrapper = [[MUIAccessible alloc] initWithAccessible:aProxy];
     27  aProxy->SetWrapper(reinterpret_cast<uintptr_t>(mozWrapper));
     28 }
     29 
     30 void ProxyDestroyed(RemoteAccessible* aProxy) {
     31  MUIAccessible* wrapper = GetNativeFromGeckoAccessible(aProxy);
     32  [wrapper expire];
     33  [wrapper release];
     34  aProxy->SetWrapper(0);
     35 }
     36 
     37 void PlatformEvent(Accessible*, uint32_t) {}
     38 
     39 void PlatformStateChangeEvent(Accessible*, uint64_t, bool) {}
     40 
     41 void PlatformFocusEvent(Accessible* aTarget) {}
     42 
     43 void PlatformCaretMoveEvent(Accessible* aTarget, int32_t aOffset,
     44                            bool aIsSelectionCollapsed, int32_t aGranularity,
     45                            bool aFromUser) {}
     46 
     47 void PlatformTextChangeEvent(Accessible*, const nsAString&, int32_t, uint32_t,
     48                             bool, bool) {}
     49 
     50 void PlatformShowHideEvent(Accessible*, Accessible*, bool, bool) {}
     51 
     52 void PlatformSelectionEvent(Accessible*, Accessible*, uint32_t) {}
     53 
     54 uint64_t GetCacheDomainsForKnownClients(uint64_t aCacheDomains) {
     55  return aCacheDomains;
     56 }
     57 
     58 }  // namespace a11y
     59 }  // namespace mozilla