summaryrefslogtreecommitdiffstats
path: root/accessible/ipc/extension
diff options
context:
space:
mode:
Diffstat (limited to 'accessible/ipc/extension')
-rw-r--r--accessible/ipc/extension/android/DocAccessiblePlatformExtChild.cpp75
-rw-r--r--accessible/ipc/extension/android/DocAccessiblePlatformExtChild.h44
-rw-r--r--accessible/ipc/extension/android/DocAccessiblePlatformExtParent.cpp16
-rw-r--r--accessible/ipc/extension/android/DocAccessiblePlatformExtParent.h18
-rw-r--r--accessible/ipc/extension/android/PDocAccessiblePlatformExt.ipdl30
-rw-r--r--accessible/ipc/extension/android/moz.build28
-rw-r--r--accessible/ipc/extension/moz.build12
-rw-r--r--accessible/ipc/extension/other/DocAccessiblePlatformExtChild.h20
-rw-r--r--accessible/ipc/extension/other/DocAccessiblePlatformExtParent.h18
-rw-r--r--accessible/ipc/extension/other/PDocAccessiblePlatformExt.ipdl20
-rw-r--r--accessible/ipc/extension/other/moz.build17
11 files changed, 298 insertions, 0 deletions
diff --git a/accessible/ipc/extension/android/DocAccessiblePlatformExtChild.cpp b/accessible/ipc/extension/android/DocAccessiblePlatformExtChild.cpp
new file mode 100644
index 0000000000..ad29ae900c
--- /dev/null
+++ b/accessible/ipc/extension/android/DocAccessiblePlatformExtChild.cpp
@@ -0,0 +1,75 @@
+/* -*- 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::RecvPivotTo(
+ uint64_t aID, int32_t aGranularity, bool aForward, bool aInclusive) {
+ if (auto acc = IdToAccessibleWrap(aID)) {
+ acc->PivotTo(aGranularity, aForward, aInclusive);
+ }
+
+ return IPC_OK();
+}
+
+mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvNavigateText(
+ uint64_t aID, int32_t aGranularity, int32_t aStartOffset,
+ int32_t aEndOffset, bool aForward, bool aSelect) {
+ if (auto acc = IdToAccessibleWrap(aID)) {
+ acc->NavigateText(aGranularity, aStartOffset, aEndOffset, aForward,
+ aSelect);
+ }
+
+ return IPC_OK();
+}
+
+mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvSetSelection(
+ uint64_t aID, int32_t aStart, int32_t aEnd) {
+ if (auto acc = IdToAccessibleWrap(aID)) {
+ acc->SetSelection(aStart, aEnd);
+ }
+
+ return IPC_OK();
+}
+
+mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvCut(uint64_t aID) {
+ if (auto acc = IdToAccessibleWrap(aID)) {
+ acc->Cut();
+ }
+
+ return IPC_OK();
+}
+
+mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvCopy(uint64_t aID) {
+ if (auto acc = IdToAccessibleWrap(aID)) {
+ acc->Copy();
+ }
+
+ return IPC_OK();
+}
+
+mozilla::ipc::IPCResult DocAccessiblePlatformExtChild::RecvPaste(uint64_t aID) {
+ if (auto acc = IdToAccessibleWrap(aID)) {
+ acc->Paste();
+ }
+
+ 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
diff --git a/accessible/ipc/extension/android/DocAccessiblePlatformExtChild.h b/accessible/ipc/extension/android/DocAccessiblePlatformExtChild.h
new file mode 100644
index 0000000000..60108213e1
--- /dev/null
+++ b/accessible/ipc/extension/android/DocAccessiblePlatformExtChild.h
@@ -0,0 +1,44 @@
+/* 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/. */
+
+#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 RecvPivotTo(uint64_t aID, int32_t aGranularity,
+ bool aForward, bool aInclusive);
+
+ mozilla::ipc::IPCResult RecvNavigateText(uint64_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
diff --git a/accessible/ipc/extension/android/DocAccessiblePlatformExtParent.cpp b/accessible/ipc/extension/android/DocAccessiblePlatformExtParent.cpp
new file mode 100644
index 0000000000..ea3f3f816d
--- /dev/null
+++ b/accessible/ipc/extension/android/DocAccessiblePlatformExtParent.cpp
@@ -0,0 +1,16 @@
+/* -*- 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 "DocAccessiblePlatformExtParent.h"
+
+#include "AccessibleWrap.h"
+#include "SessionAccessibility.h"
+
+#include "mozilla/a11y/DocAccessibleParent.h"
+
+namespace mozilla {
+namespace a11y {} // namespace a11y
+} // namespace mozilla
diff --git a/accessible/ipc/extension/android/DocAccessiblePlatformExtParent.h b/accessible/ipc/extension/android/DocAccessiblePlatformExtParent.h
new file mode 100644
index 0000000000..e2e1cd907f
--- /dev/null
+++ b/accessible/ipc/extension/android/DocAccessiblePlatformExtParent.h
@@ -0,0 +1,18 @@
+/* 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/. */
+
+#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
diff --git a/accessible/ipc/extension/android/PDocAccessiblePlatformExt.ipdl b/accessible/ipc/extension/android/PDocAccessiblePlatformExt.ipdl
new file mode 100644
index 0000000000..6b9924cf1a
--- /dev/null
+++ b/accessible/ipc/extension/android/PDocAccessiblePlatformExt.ipdl
@@ -0,0 +1,30 @@
+/* -*- 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 protocol PDocAccessible;
+
+namespace mozilla {
+namespace a11y {
+
+[ManualDealloc]
+protocol PDocAccessiblePlatformExt {
+ manager PDocAccessible;
+
+child:
+ async __delete__();
+
+ async NavigateText(uint64_t aID, int32_t aGranularity, int32_t aStartOffset, int32_t aEndOffset, bool aForward, bool aSelect);
+
+ async SetSelection(uint64_t aID, int32_t aStart, int32_t aEnd);
+
+ async Cut(uint64_t aID);
+
+ async Copy(uint64_t aID);
+
+ async Paste(uint64_t aID);
+ };
+}
+}
diff --git a/accessible/ipc/extension/android/moz.build b/accessible/ipc/extension/android/moz.build
new file mode 100644
index 0000000000..de0781643c
--- /dev/null
+++ b/accessible/ipc/extension/android/moz.build
@@ -0,0 +1,28 @@
+# -*- 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/.
+
+if CONFIG["ACCESSIBILITY"]:
+ IPDL_SOURCES += ["PDocAccessiblePlatformExt.ipdl"]
+
+ EXPORTS.mozilla.a11y += [
+ "DocAccessiblePlatformExtChild.h",
+ "DocAccessiblePlatformExtParent.h",
+ ]
+
+ SOURCES += [
+ "DocAccessiblePlatformExtChild.cpp",
+ ]
+
+ LOCAL_INCLUDES += [
+ "/accessible/android",
+ "/accessible/generic",
+ "/accessible/ipc/other",
+ "/widget/android",
+ ]
+
+include("/ipc/chromium/chromium-config.mozbuild")
+
+FINAL_LIBRARY = "xul"
diff --git a/accessible/ipc/extension/moz.build b/accessible/ipc/extension/moz.build
new file mode 100644
index 0000000000..1d19d551fa
--- /dev/null
+++ b/accessible/ipc/extension/moz.build
@@ -0,0 +1,12 @@
+# -*- 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/.
+
+toolkit = CONFIG["MOZ_WIDGET_TOOLKIT"]
+
+if toolkit == "android":
+ DIRS += ["android"]
+else:
+ DIRS += ["other"]
diff --git a/accessible/ipc/extension/other/DocAccessiblePlatformExtChild.h b/accessible/ipc/extension/other/DocAccessiblePlatformExtChild.h
new file mode 100644
index 0000000000..6a6542bf71
--- /dev/null
+++ b/accessible/ipc/extension/other/DocAccessiblePlatformExtChild.h
@@ -0,0 +1,20 @@
+/* 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/. */
+
+#ifndef mozilla_a11y_DocAccessiblePlatformExtChild_h
+#define mozilla_a11y_DocAccessiblePlatformExtChild_h
+
+#include "mozilla/a11y/PDocAccessiblePlatformExtChild.h"
+
+namespace mozilla {
+namespace a11y {
+
+class DocAccessibleChild;
+
+class DocAccessiblePlatformExtChild : public PDocAccessiblePlatformExtChild {};
+} // namespace a11y
+} // namespace mozilla
+
+#endif
diff --git a/accessible/ipc/extension/other/DocAccessiblePlatformExtParent.h b/accessible/ipc/extension/other/DocAccessiblePlatformExtParent.h
new file mode 100644
index 0000000000..e2e1cd907f
--- /dev/null
+++ b/accessible/ipc/extension/other/DocAccessiblePlatformExtParent.h
@@ -0,0 +1,18 @@
+/* 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/. */
+
+#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
diff --git a/accessible/ipc/extension/other/PDocAccessiblePlatformExt.ipdl b/accessible/ipc/extension/other/PDocAccessiblePlatformExt.ipdl
new file mode 100644
index 0000000000..738505a743
--- /dev/null
+++ b/accessible/ipc/extension/other/PDocAccessiblePlatformExt.ipdl
@@ -0,0 +1,20 @@
+/* -*- 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 protocol PDocAccessible;
+
+namespace mozilla {
+namespace a11y {
+
+[ManualDealloc]
+protocol PDocAccessiblePlatformExt {
+ manager PDocAccessible;
+
+child:
+ async __delete__();
+};
+
+}} \ No newline at end of file
diff --git a/accessible/ipc/extension/other/moz.build b/accessible/ipc/extension/other/moz.build
new file mode 100644
index 0000000000..dbbc98702c
--- /dev/null
+++ b/accessible/ipc/extension/other/moz.build
@@ -0,0 +1,17 @@
+# -*- 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/.
+
+if CONFIG["ACCESSIBILITY"]:
+ IPDL_SOURCES += ["PDocAccessiblePlatformExt.ipdl"]
+
+ EXPORTS.mozilla.a11y += [
+ "DocAccessiblePlatformExtChild.h",
+ "DocAccessiblePlatformExtParent.h",
+ ]
+
+include("/ipc/chromium/chromium-config.mozbuild")
+
+FINAL_LIBRARY = "xul"