1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
ash / components / arc / mojom / webapk.mojom [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Next MinVersion: 3
module arc.mojom;
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
[Extensible]
enum WebApkInstallResult {
kSuccess = 0,
kErrorUnknown = 1,
// Errors while communicating with PlayInstallService.
kErrorServiceCommunication = 2,
kErrorServiceTimeout = 3,
// Errors returned from PlayInstallService directly.
kErrorCallerVerificationFailed = 4,
kErrorPolicyViolation = 5,
kErrorApiDisabled = 6,
kErrorUnknownAccount = 7,
kErrorResolveNetworkError = 8,
kErrorResolveError = 9,
kErrorNotGoogleSigned = 10,
// Errors while installing the WebAPK through Play.
[MinVersion=1] kErrorDownloadCancelled = 11,
[MinVersion=1] kErrorDownloadError = 12,
[MinVersion=1] kErrorInstallError = 13,
};
struct WebShareTargetInfo {
string? action;
string? method;
string? enctype;
string? param_title;
string? param_text;
string? param_url;
array<string> file_names;
array<array<string>> file_accepts;
};
// Information which can be read from the APK.
struct WebApkInfo {
string package_name;
// The version of the currently installed APK, as generated by the minter.
string apk_version;
// The version of the common shell apk used to provide a template.
string shell_apk_version;
// Core metadata used to generate the APK:
string manifest_url;
string name;
string start_url;
string scope;
string icon_hash;
WebShareTargetInfo? share_info;
};
// Allows Chrome to install and manage WebAPKs inside ARC.
// Next method ID: 2
interface WebApkInstance {
// Install or update a WebAPK with the given |package_name|.
InstallWebApk@0(string package_name,
uint32 version,
string app_name,
string token) =>
(WebApkInstallResult result);
// Gets the metadata stored within a WebAPK, defined by |pacakge_name|.
// Result is empty if no web apk was found with that |package name|.
[MinVersion=2] GetWebApkInfo@1(string package_name) => (WebApkInfo? result);
};