| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Next MinVersion: 5 | 5 // Next MinVersion: 6 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 // These values describe failure reason of sign-in. | 9 // These values describe failure reason of sign-in. |
| 10 [Extensible] | 10 [Extensible] |
| 11 enum ArcSignInFailureReason { | 11 enum ArcSignInFailureReason { |
| 12 // Negative values are reserved for internal use. | 12 // Negative values are reserved for internal use. |
| 13 // The values are shuffled to keep the backward compatibility and don't match | 13 // The values are shuffled to keep the backward compatibility and don't match |
| 14 // ProvisioningResult in arc_optin_uma.h | 14 // ProvisioningResult in arc_optin_uma.h |
| 15 // Next value: 15. | 15 // Next value: 15. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // Cloud provisioning errors. | 60 // Cloud provisioning errors. |
| 61 CLOUD_PROVISION_FLOW_FAILED = 5, | 61 CLOUD_PROVISION_FLOW_FAILED = 5, |
| 62 CLOUD_PROVISION_FLOW_TIMEOUT = 13, | 62 CLOUD_PROVISION_FLOW_TIMEOUT = 13, |
| 63 CLOUD_PROVISION_FLOW_INTERNAL_ERROR = 14, | 63 CLOUD_PROVISION_FLOW_INTERNAL_ERROR = 14, |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 // These values describe the type of the Chrome account to provision. | 66 // These values describe the type of the Chrome account to provision. |
| 67 [Extensible] | 67 [Extensible] |
| 68 enum ChromeAccountType { | 68 enum ChromeAccountType { |
| 69 // Next value: 3 | 69 // Next value: 3 |
| 70 UNKNOWN = 0, | 70 UNKNOWN = 0, |
| 71 | 71 |
| 72 // Chrome login account type is a user account. | 72 // Chrome login account type is a user account. |
| 73 USER_ACCOUNT = 1, | 73 USER_ACCOUNT = 1, |
| 74 | 74 |
| 75 // Chrome login account type is a robot (service) account. | 75 // Chrome login account type is a robot (service) account. |
| 76 ROBOT_ACCOUNT = 2, | 76 ROBOT_ACCOUNT = 2, |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 // The necessary information for Android to sign in and provision itself. |
| 80 struct AccountInfo { |
| 81 // The authorization code that can be used in Android to sign in. If it is |
| 82 // null, sign-in will be skipped. |
| 83 string? auth_code; |
| 84 |
| 85 // The type of Chrome account to provision. |
| 86 ChromeAccountType account_type; |
| 87 |
| 88 // Whether the account is managed from Chrome OS. |
| 89 bool is_managed; |
| 90 }; |
| 91 |
| 92 // Next Method ID: 7. |
| 79 interface AuthHost { | 93 interface AuthHost { |
| 80 // Next Method ID: 6. | |
| 81 // Returns an authorization code, which can be used to sign in. | |
| 82 GetAuthCodeDeprecated@0() => (string auth_code); | |
| 83 // Returns an authorization code in case is_enforced is set, which can be used | |
| 84 // to sign in. By default the ChromeAccountType is USER_ACCOUNT. | |
| 85 [MinVersion=1] GetAuthCode@1() => (string auth_code, bool is_enforced); | |
| 86 // Returns an authorization code and its ChromeAccountType in case | |
| 87 // is_enforced is set, which can be used to sign in. | |
| 88 [MinVersion=4] GetAuthCodeAndAccountType@5() => ( | |
| 89 string auth_code, bool is_enforced, ChromeAccountType account_type); | |
| 90 // Gets whether the account is managed from Chrome OS. | |
| 91 [MinVersion=3] GetIsAccountManaged@4() => (bool is_managed); | |
| 92 // Notifies Chrome that the sign-in is completed successfully. | 94 // Notifies Chrome that the sign-in is completed successfully. |
| 93 [MinVersion=2] OnSignInComplete@2(); | 95 [MinVersion=2] OnSignInComplete@2(); |
| 94 // Notifies Chrome that the sign-in fails to complete and provides failure | 96 // Notifies Chrome that the sign-in fails to complete and provides failure |
| 95 // reason. | 97 // reason. |
| 96 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 98 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
| 99 // Asynchronously requests an authorization code, as well as the account |
| 100 // information. |
| 101 [MinVersion=5] RequestAccountInfo@7(); |
| 102 |
| 103 // Deprecated methods: |
| 104 |
| 105 // Returns an authorization code, which can be used to sign in. |
| 106 GetAuthCodeDeprecated0@0() => (string auth_code); |
| 107 // Returns an authorization code in case is_enforced is set, which can be |
| 108 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. |
| 109 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, |
| 110 bool is_enforced); |
| 111 // Returns an authorization code and its ChromeAccountType in case |
| 112 // is_enforced is set, which can be used to sign in. |
| 113 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( |
| 114 string auth_code, bool is_enforced, ChromeAccountType account_type); |
| 115 // Gets whether the account is managed from Chrome OS. |
| 116 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); |
| 97 }; | 117 }; |
| 98 | 118 |
| 119 // Next Method ID: 2 |
| 99 interface AuthInstance { | 120 interface AuthInstance { |
| 100 // Establishes full-duplex communication with the host. | 121 // Establishes full-duplex communication with the host. |
| 101 Init@0(AuthHost host_ptr); | 122 Init@0(AuthHost host_ptr); |
| 123 |
| 124 // Callback from RequestAccountInfo. This cannot be a normal callback since |
| 125 // the result can sometimes take a few minutes in some cases (Kiosk mode), |
| 126 // and in other cases there is a UI that the user is shown and they can take |
| 127 // an arbitrarily long amount of time to interact with. |
| 128 // If |account_info| is null, it implies that there was an error in the |
| 129 // process. |
| 130 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
| 102 }; | 131 }; |
| OLD | NEW |