| Index: components/arc/common/auth.mojom
|
| diff --git a/components/arc/common/auth.mojom b/components/arc/common/auth.mojom
|
| index faa0c0fb2a6f24e2d84f7d0ff0baa00a95d838db..8a6ba3c0cf7aad641dc5ddbdd3d44254327a2ad5 100644
|
| --- a/components/arc/common/auth.mojom
|
| +++ b/components/arc/common/auth.mojom
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -// Next MinVersion: 5
|
| +// Next MinVersion: 6
|
|
|
| module arc.mojom;
|
|
|
| @@ -66,37 +66,66 @@ enum ArcSignInFailureReason {
|
| // These values describe the type of the Chrome account to provision.
|
| [Extensible]
|
| enum ChromeAccountType {
|
| - // Next value: 3
|
| - UNKNOWN = 0,
|
| + // Next value: 3
|
| + UNKNOWN = 0,
|
|
|
| - // Chrome login account type is a user account.
|
| - USER_ACCOUNT = 1,
|
| + // Chrome login account type is a user account.
|
| + USER_ACCOUNT = 1,
|
|
|
| - // Chrome login account type is a robot (service) account.
|
| - ROBOT_ACCOUNT = 2,
|
| + // Chrome login account type is a robot (service) account.
|
| + ROBOT_ACCOUNT = 2,
|
| };
|
|
|
| +// The necessary information for Android to sign in and provision itself.
|
| +struct AccountInfo {
|
| + // The authorization code that can be used in Android to sign in. If it is
|
| + // null, sign-in will be skipped.
|
| + string? auth_code;
|
| +
|
| + // The type of Chrome account to provision.
|
| + ChromeAccountType account_type;
|
| +
|
| + // Whether the account is managed from Chrome OS.
|
| + bool is_managed;
|
| +};
|
| +
|
| +// Next Method ID: 7.
|
| interface AuthHost {
|
| - // Next Method ID: 6.
|
| - // Returns an authorization code, which can be used to sign in.
|
| - GetAuthCodeDeprecated@0() => (string auth_code);
|
| - // Returns an authorization code in case is_enforced is set, which can be used
|
| - // to sign in. By default the ChromeAccountType is USER_ACCOUNT.
|
| - [MinVersion=1] GetAuthCode@1() => (string auth_code, bool is_enforced);
|
| - // Returns an authorization code and its ChromeAccountType in case
|
| - // is_enforced is set, which can be used to sign in.
|
| - [MinVersion=4] GetAuthCodeAndAccountType@5() => (
|
| - string auth_code, bool is_enforced, ChromeAccountType account_type);
|
| - // Gets whether the account is managed from Chrome OS.
|
| - [MinVersion=3] GetIsAccountManaged@4() => (bool is_managed);
|
| // Notifies Chrome that the sign-in is completed successfully.
|
| [MinVersion=2] OnSignInComplete@2();
|
| // Notifies Chrome that the sign-in fails to complete and provides failure
|
| // reason.
|
| [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason);
|
| + // Asynchronously requests an authorization code, as well as the account
|
| + // information.
|
| + [MinVersion=5] RequestAccountInfo@7();
|
| +
|
| + // Deprecated methods:
|
| +
|
| + // Returns an authorization code, which can be used to sign in.
|
| + GetAuthCodeDeprecated0@0() => (string auth_code);
|
| + // Returns an authorization code in case is_enforced is set, which can be
|
| + // used to sign in. By default the ChromeAccountType is USER_ACCOUNT.
|
| + [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code,
|
| + bool is_enforced);
|
| + // Returns an authorization code and its ChromeAccountType in case
|
| + // is_enforced is set, which can be used to sign in.
|
| + [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => (
|
| + string auth_code, bool is_enforced, ChromeAccountType account_type);
|
| + // Gets whether the account is managed from Chrome OS.
|
| + [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed);
|
| };
|
|
|
| +// Next Method ID: 2
|
| interface AuthInstance {
|
| // Establishes full-duplex communication with the host.
|
| Init@0(AuthHost host_ptr);
|
| +
|
| + // Callback from RequestAccountInfo. This cannot be a normal callback since
|
| + // the result can sometimes take a few minutes in some cases (Kiosk mode),
|
| + // and in other cases there is a UI that the user is shown and they can take
|
| + // an arbitrarily long amount of time to interact with.
|
| + // If |account_info| is null, it implies that there was an error in the
|
| + // process.
|
| + [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info);
|
| };
|
|
|