summaryrefslogtreecommitdiff
path: root/chromium/chromeos/language
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-02-02 12:21:57 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-02-12 08:13:00 +0000
commit606d85f2a5386472314d39923da28c70c60dc8e7 (patch)
treea8f4d7bf997f349f45605e6058259fba0630e4d7 /chromium/chromeos/language
parent5786336dda477d04fb98483dca1a5426eebde2d7 (diff)
downloadqtwebengine-chromium-606d85f2a5386472314d39923da28c70c60dc8e7.tar.gz
BASELINE: Update Chromium to 96.0.4664.181
Change-Id: I762cd1da89d73aa6313b4a753fe126c34833f046 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chromeos/language')
-rw-r--r--chromium/chromeos/language/language_packs/BUILD.gn3
-rw-r--r--chromium/chromeos/language/public/mojom/BUILD.gn10
-rw-r--r--chromium/chromeos/language/public/mojom/language_packs.mojom50
3 files changed, 63 insertions, 0 deletions
diff --git a/chromium/chromeos/language/language_packs/BUILD.gn b/chromium/chromeos/language/language_packs/BUILD.gn
index ed5b870ec73..b55d0abecb3 100644
--- a/chromium/chromeos/language/language_packs/BUILD.gn
+++ b/chromium/chromeos/language/language_packs/BUILD.gn
@@ -8,11 +8,14 @@ static_library("language_packs") {
sources = [
"language_pack_manager.cc",
"language_pack_manager.h",
+ "language_packs_impl.cc",
+ "language_packs_impl.h",
]
deps = [
"//base",
"//chromeos/dbus/dlcservice:dlcservice",
"//chromeos/dbus/dlcservice:dlcservice_proto",
+ "//chromeos/language/public/mojom",
]
}
diff --git a/chromium/chromeos/language/public/mojom/BUILD.gn b/chromium/chromeos/language/public/mojom/BUILD.gn
new file mode 100644
index 00000000000..80015af0de6
--- /dev/null
+++ b/chromium/chromeos/language/public/mojom/BUILD.gn
@@ -0,0 +1,10 @@
+# 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.
+
+import("//mojo/public/tools/bindings/mojom.gni")
+
+mojom("mojom") {
+ sources = [ "language_packs.mojom" ]
+ public_deps = [ "//mojo/public/mojom/base" ]
+}
diff --git a/chromium/chromeos/language/public/mojom/language_packs.mojom b/chromium/chromeos/language/public/mojom/language_packs.mojom
new file mode 100644
index 00000000000..994021fc691
--- /dev/null
+++ b/chromium/chromeos/language/public/mojom/language_packs.mojom
@@ -0,0 +1,50 @@
+// 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.
+
+// Private API exposed by Language Packs.
+// It allows clients to check, request and observe the files managed by
+// Language Packs.
+
+module chromeos.language.mojom;
+
+// ID of the Feature using LanguagePacks.
+enum FeatureId {
+ // Unknown feature, not supported.
+ UNSUPPORTED_UNKNOWN = 0,
+ // Handwriting Recognition used by the Virtual Keyboard.
+ HANDWRITING_RECOGNITION = 1,
+};
+
+// Current state of Pack on disk.
+// INSTALLED means that it's mounted and can be used.
+enum PackState {
+ ERROR = 0,
+ NOT_INSTALLED = 1,
+ INSTALLING = 2,
+ INSTALLED = 3
+};
+
+// This struct holds information that allows clients to use a Pack.
+struct LanguagePackInfo {
+ PackState pack_state;
+ string path;
+};
+
+// Interface for managing Language Packs.
+// Lives in the browser process and it allows clients to get information
+// about a Language Pack or to install one.
+// Language Packs are mounted to the user partition once they are installed and
+// this interface allows to get the path to the files.
+// Next ordinal: 2
+interface LanguagePacks {
+ // Gets information about the current state of a Language Pack.
+ // Takes the id of the feature (for example handwriting) and the language.
+ GetPackInfo@0(FeatureId feature_id, string language) =>
+ (LanguagePackInfo info);
+
+ // Requests to install a Language Pack.
+ // Takes the id of the feature (for example handwriting) and the language.
+ InstallPack@1(FeatureId feature_id, string language) =>
+ (LanguagePackInfo info);
+};