mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1565728 - Introduce PDocAccessiblePlatformExt for Android. r=Jamie
Ultimately Batch from PDocAccessible would be moved to here as well. Differential Revision: https://phabricator.services.mozilla.com/D37954 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
82aa8a18ca
commit
28c79c116e
@ -0,0 +1,81 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "DocAccessiblePlatformExtChild.h"
|
||||
|
||||
#include "DocAccessibleChild.h"
|
||||
#include "AccessibleWrap.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvPivot(
|
||||
uint64_t aID, int32_t aGranularity, bool aForward, bool aInclusive) {
|
||||
if (auto acc = IdToAccessibleWrap(aID)) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvNavigateText(
|
||||
int32_t aID, int32_t aGranularity, int32_t aStartOffset, int32_t aEndOffset,
|
||||
bool aForward, bool aSelect) {
|
||||
if (auto acc = IdToAccessibleWrap(aID)) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvSetSelection(
|
||||
uint64_t aID, int32_t aStart, int32_t aEnd) {
|
||||
if (auto acc = IdToAccessibleWrap(aID)) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvCut(uint64_t aID) {
|
||||
if (auto acc = IdToAccessibleWrap(aID)) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvCopy(uint64_t aID) {
|
||||
if (auto acc = IdToAccessibleWrap(aID)) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvPaste(uint64_t aID) {
|
||||
if (auto acc = IdToAccessibleWrap(aID)) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvExploreByTouch(
|
||||
uint64_t aID, float aX, float aY) {
|
||||
// XXX: Forward to appropriate wrapper method.
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
AccessibleWrap* DocAccessiblePlatformExtChild::IdToAccessibleWrap(
|
||||
const uint64_t& aID) const {
|
||||
return static_cast<AccessibleWrap*>(
|
||||
static_cast<DocAccessibleChild*>(Manager())->IdToAccessible(aID));
|
||||
}
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
@ -0,0 +1,39 @@
|
||||
#ifndef mozilla_a11y_DocAccessiblePlatformExtChild_h
|
||||
#define mozilla_a11y_DocAccessiblePlatformExtChild_h
|
||||
|
||||
#include "mozilla/a11y/PDocAccessiblePlatformExtChild.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class AccessibleWrap;
|
||||
class DocAccessibleChild;
|
||||
|
||||
class DocAccessiblePlatformExtChild : public PDocAccessiblePlatformExtChild {
|
||||
public:
|
||||
mozilla::ipc::IPCResult RecvPivot(uint64_t aID, int32_t aGranularity,
|
||||
bool aForward, bool aInclusive);
|
||||
|
||||
mozilla::ipc::IPCResult RecvNavigateText(int32_t aID, int32_t aGranularity,
|
||||
int32_t aStartOffset,
|
||||
int32_t aEndOffset, bool aForward,
|
||||
bool aSelect);
|
||||
|
||||
mozilla::ipc::IPCResult RecvSetSelection(uint64_t aID, int32_t aStart,
|
||||
int32_t aEnd);
|
||||
|
||||
mozilla::ipc::IPCResult RecvCut(uint64_t aID);
|
||||
|
||||
mozilla::ipc::IPCResult RecvCopy(uint64_t aID);
|
||||
|
||||
mozilla::ipc::IPCResult RecvPaste(uint64_t aID);
|
||||
|
||||
mozilla::ipc::IPCResult RecvExploreByTouch(uint64_t aID, float aX, float aY);
|
||||
|
||||
private:
|
||||
AccessibleWrap* IdToAccessibleWrap(const uint64_t& aID) const;
|
||||
};
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
@ -0,0 +1,12 @@
|
||||
#ifndef mozilla_a11y_DocAccessiblePlatformExtParent_h
|
||||
#define mozilla_a11y_DocAccessiblePlatformExtParent_h
|
||||
|
||||
#include "mozilla/a11y/PDocAccessiblePlatformExtParent.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
class DocAccessiblePlatformExtParent : public PDocAccessiblePlatformExtParent {};
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
@ -0,0 +1,27 @@
|
||||
include protocol PDocAccessible;
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
protocol PDocAccessiblePlatformExt {
|
||||
manager PDocAccessible;
|
||||
|
||||
child:
|
||||
async __delete__();
|
||||
|
||||
async Pivot(uint64_t aID, int32_t aGranularity, bool aForward, bool aInclusive);
|
||||
|
||||
async NavigateText(int32_t aID, int32_t aGranularity, int32_t aStartOffset, int32_t aEndOffset, bool aForward, bool aSelect);
|
||||
|
||||
async SetSelection(int32_t aID, int32_t aStart, int32_t aEnd);
|
||||
|
||||
async Cut(int32_t aID);
|
||||
|
||||
async Copy(int32_t aID);
|
||||
|
||||
async Paste(int32_t aID);
|
||||
|
||||
async ExploreByTouch(int32_t aID, float aX, float aY);
|
||||
};
|
||||
}
|
||||
}
|
29
accessible/ipc/extension/android/moz.build
Normal file
29
accessible/ipc/extension/android/moz.build
Normal file
@ -0,0 +1,29 @@
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# With --disable-accessibility, we need to compile PDocAccessiblePlatformExt.ipdl, but
|
||||
# not the C++.
|
||||
|
||||
IPDL_SOURCES += ['PDocAccessiblePlatformExt.ipdl']
|
||||
|
||||
if CONFIG['ACCESSIBILITY']:
|
||||
EXPORTS.mozilla.a11y += [
|
||||
'DocAccessiblePlatformExtChild.h',
|
||||
'DocAccessiblePlatformExtParent.h',
|
||||
]
|
||||
|
||||
SOURCES += [
|
||||
'DocAccessiblePlatformExtChild.cpp',
|
||||
]
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/accessible/android',
|
||||
'/accessible/ipc/other',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
@ -4,4 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DIRS += ['other']
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
DIRS += ['android']
|
||||
else:
|
||||
DIRS += ['other']
|
||||
|
Loading…
Reference in New Issue
Block a user