summaryrefslogtreecommitdiff
path: root/chromium/chrome/common/accessibility/read_anything.mojom
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-09-29 16:16:15 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 10:04:06 +0000
commita95a7417ad456115a1ef2da4bb8320531c0821f1 (patch)
treeedcd59279e486d2fd4a8f88a7ed025bcf925c6e6 /chromium/chrome/common/accessibility/read_anything.mojom
parent33fc33aa94d4add0878ec30dc818e34e1dd3cc2a (diff)
downloadqtwebengine-chromium-a95a7417ad456115a1ef2da4bb8320531c0821f1.tar.gz
BASELINE: Update Chromium to 106.0.5249.126
Change-Id: Ib0bb21c437a7d1686e21c33f2d329f2ac425b7ab Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/438936 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/common/accessibility/read_anything.mojom')
-rw-r--r--chromium/chrome/common/accessibility/read_anything.mojom59
1 files changed, 59 insertions, 0 deletions
diff --git a/chromium/chrome/common/accessibility/read_anything.mojom b/chromium/chrome/common/accessibility/read_anything.mojom
new file mode 100644
index 00000000000..edc974fd325
--- /dev/null
+++ b/chromium/chrome/common/accessibility/read_anything.mojom
@@ -0,0 +1,59 @@
+// Copyright 2021 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// A module for a prototype of the Read Anything feature.
+module read_anything.mojom;
+
+import "skia/public/mojom/skcolor.mojom";
+import "ui/accessibility/mojom/ax_tree_update.mojom";
+
+// Used to represent the current user choices for the Read Anything visual
+// presentation/theme. This includes font name, size, spacing, and colors.
+struct ReadAnythingTheme {
+ // The name of the user's font choice.
+ string font_name;
+
+ // The px value of the user's font size.
+ float font_size;
+
+ // The various colors of the user's chosen theme.
+ skia.mojom.SkColor foreground_color;
+ skia.mojom.SkColor background_color;
+};
+
+// Used by the WebUI page to bootstrap bidirectional communication.
+interface PageHandlerFactory {
+ // The WebUI calls this method when the page is first initialized.
+ CreatePageHandler(pending_remote<Page> page,
+ pending_receiver<PageHandler> handler);
+};
+
+// Used as identifiers for the Read Anything theme options.
+// Next value: 4
+[Extensible, Stable, Uuid="03f38cfc-a34f-460a-a0a7-faf711f11a64"]
+enum Colors {
+ [Default]kDefault = 0,
+ kLight = 1,
+ kDark = 2,
+ kYellow = 3,
+};
+
+// Browser-side handler for requests from WebUI page.
+interface PageHandler {
+ // TODO(crbug.com/1266555): Fill in with messages once Select to Read Anything
+ // is implemented.
+};
+
+// WebUI-side handler for requests from the browser.
+interface Page {
+ // Trigger the frontend to update the current read anything display. Snapshot
+ // is an accessibility tree snapshot of a web page. Content node ids are node
+ // ids from that ax tree update, where each node is part of the main article
+ // for that web page.
+ OnAXTreeDistilled(ax.mojom.AXTreeUpdate snapshot,
+ array<int32> content_node_ids);
+
+ // Send an updated theme to front end.
+ OnThemeChanged(ReadAnythingTheme new_theme);
+};