| 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: 9 | 5 // Next MinVersion: 10 |
| 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: 16. | 15 // Next value: 16. |
| (...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 // Network connection is unavailable. | 65 // Network connection is unavailable. |
| 66 [MinVersion=8] NO_NETWORK_CONNECTION = 15, | 66 [MinVersion=8] NO_NETWORK_CONNECTION = 15, |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // These values describe account check status. |
| 70 [Extensible] |
| 71 enum AccountCheckStatus { |
| 72 // Checked account exists and is up to date. |
| 73 [MinVersion=9] UP_TO_DATE = 0, |
| 74 |
| 75 // Checked account is new in the system. |
| 76 [MinVersion=9] NEW = 1, |
| 77 |
| 78 // Checked account exists but need to be reauthorized. |
| 79 [MinVersion=9] NEED_REAUTH = 2, |
| 80 |
| 81 // Checked account exists but it is in unknown state. |
| 82 [MinVersion=9] UNKNOWN = 3, |
| 83 |
| 84 // Account check has failed. |
| 85 [MinVersion=9] CHECK_FAILED = 4, |
| 86 }; |
| 87 |
| 69 // These values describe the type of the Chrome account to provision. | 88 // These values describe the type of the Chrome account to provision. |
| 70 [Extensible] | 89 [Extensible] |
| 71 enum ChromeAccountType { | 90 enum ChromeAccountType { |
| 72 // Next value: 4 | 91 // Next value: 4 |
| 73 UNKNOWN = 0, | 92 UNKNOWN = 0, |
| 74 | 93 |
| 75 // Chrome login account type is a user account. | 94 // Chrome login account type is a user account. |
| 76 USER_ACCOUNT = 1, | 95 USER_ACCOUNT = 1, |
| 77 | 96 |
| 78 // Chrome login account type is a robot (service) account. | 97 // Chrome login account type is a robot (service) account. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 90 | 109 |
| 91 // Number of attempts to wait for Checkin task completed. 0 indicates that | 110 // Number of attempts to wait for Checkin task completed. 0 indicates that |
| 92 // Checkin task was already completed prior to GMS SignIn. | 111 // Checkin task was already completed prior to GMS SignIn. |
| 93 CHECKIN_ATTEMPTS = 1, | 112 CHECKIN_ATTEMPTS = 1, |
| 94 | 113 |
| 95 // Duration of waiting for Checkin task completed in milliseconds. | 114 // Duration of waiting for Checkin task completed in milliseconds. |
| 96 CHECKIN_TIME_MILLISECONDS = 2, | 115 CHECKIN_TIME_MILLISECONDS = 2, |
| 97 | 116 |
| 98 // Duration of waiting for sign-in completed in milliseconds. | 117 // Duration of waiting for sign-in completed in milliseconds. |
| 99 SIGNIN_TIME_MILLISECONDS = 3, | 118 SIGNIN_TIME_MILLISECONDS = 3, |
| 119 |
| 120 // Duration of checking the status of account. |
| 121 [MinVersion=9] ACCOUNT_CHECK_MILLISECONDS = 4, |
| 100 }; | 122 }; |
| 101 | 123 |
| 102 // The necessary information for Android to sign in and provision itself. | 124 // The necessary information for Android to sign in and provision itself. |
| 103 struct AccountInfo { | 125 struct AccountInfo { |
| 126 // Name of account, used to map to existing Android account. |
| 127 [MinVersion=9] string? account_name@4; |
| 128 |
| 104 // The authorization code that can be used in Android to sign in when | 129 // The authorization code that can be used in Android to sign in when |
| 105 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these | 130 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these |
| 106 // cases, sign-in will be skipped. | 131 // cases, sign-in will be skipped. |
| 107 string? auth_code@0; | 132 string? auth_code@0; |
| 108 | 133 |
| 109 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment | 134 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment |
| 110 // token for a Managed Google Play account. If it is null in this case, | 135 // token for a Managed Google Play account. If it is null in this case, |
| 111 // sign-in will be skipped. | 136 // sign-in will be skipped. |
| 112 [MinVersion=6] string? enrollment_token@3; | 137 [MinVersion=6] string? enrollment_token@3; |
| 113 | 138 |
| 114 // The type of Chrome account to provision. | 139 // The type of Chrome account to provision. |
| 115 ChromeAccountType account_type@1; | 140 ChromeAccountType account_type@1; |
| 116 | 141 |
| 117 // Whether the account is managed from Chrome OS. | 142 // Whether the account is managed from Chrome OS. |
| 118 bool is_managed@2; | 143 bool is_managed@2; |
| 119 }; | 144 }; |
| 120 | 145 |
| 121 // Next Method ID: 9. | 146 // Next Method ID: 10. |
| 122 interface AuthHost { | 147 interface AuthHost { |
| 123 // Notifies Chrome that the sign-in is completed successfully. | 148 // Notifies Chrome that the sign-in is completed successfully. |
| 124 [MinVersion=2] OnSignInComplete@2(); | 149 [MinVersion=2] OnSignInComplete@2(); |
| 125 // Notifies Chrome that the sign-in fails to complete and provides failure | 150 // Notifies Chrome that the sign-in fails to complete and provides failure |
| 126 // reason. | 151 // reason. |
| 127 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 152 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
| 128 // Asynchronously requests an authorization code, as well as the account | 153 // Asynchronously requests an authorization code, as well as the account |
| 129 // information. | 154 // information. |
| 130 [MinVersion=5] RequestAccountInfo@7(); | 155 [MinVersion=5] RequestAccountInfo@7(); |
| 131 | 156 |
| 132 // Reports metrics to Chrome to be recorded in UMA. | 157 // Reports metrics to Chrome to be recorded in UMA. |
| 133 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); | 158 [MinVersion=7] ReportMetrics@8(MetricsType metrics_type, int32 value); |
| 134 | 159 |
| 160 // Reports result of account check. |
| 161 [MinVersion=9] ReportAccountCheckStatus@9(AccountCheckStatus status); |
| 162 |
| 135 // Deprecated methods: | 163 // Deprecated methods: |
| 136 | 164 |
| 137 // Returns an authorization code, which can be used to sign in. | 165 // Returns an authorization code, which can be used to sign in. |
| 138 GetAuthCodeDeprecated0@0() => (string auth_code); | 166 GetAuthCodeDeprecated0@0() => (string auth_code); |
| 139 // Returns an authorization code in case is_enforced is set, which can be | 167 // Returns an authorization code in case is_enforced is set, which can be |
| 140 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. | 168 // used to sign in. By default the ChromeAccountType is USER_ACCOUNT. |
| 141 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, | 169 [MinVersion=1] GetAuthCodeDeprecated@1() => (string auth_code, |
| 142 bool is_enforced); | 170 bool is_enforced); |
| 143 // Returns an authorization code and its ChromeAccountType in case | 171 // Returns an authorization code and its ChromeAccountType in case |
| 144 // is_enforced is set, which can be used to sign in. | 172 // is_enforced is set, which can be used to sign in. |
| 145 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( | 173 [MinVersion=4] GetAuthCodeAndAccountTypeDeprecated@5() => ( |
| 146 string auth_code, bool is_enforced, ChromeAccountType account_type); | 174 string auth_code, bool is_enforced, ChromeAccountType account_type); |
| 147 // Gets whether the account is managed from Chrome OS. | 175 // Gets whether the account is managed from Chrome OS. |
| 148 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); | 176 [MinVersion=3] GetIsAccountManagedDeprecated@4() => (bool is_managed); |
| 149 }; | 177 }; |
| 150 | 178 |
| 151 // Next Method ID: 2 | 179 // Next Method ID: 2 |
| 152 interface AuthInstance { | 180 interface AuthInstance { |
| 153 // Establishes full-duplex communication with the host. | 181 // Establishes full-duplex communication with the host. |
| 154 Init@0(AuthHost host_ptr); | 182 Init@0(AuthHost host_ptr); |
| 155 | 183 |
| 156 // Callback from RequestAccountInfo. This cannot be a normal callback since | 184 // Callback from RequestAccountInfo. This cannot be a normal callback since |
| 157 // the result can sometimes take a few minutes in some cases (Kiosk mode), | 185 // the result can sometimes take a few minutes in some cases (Kiosk mode), |
| 158 // and in other cases there is a UI that the user is shown and they can take | 186 // and in other cases there is a UI that the user is shown and they can take |
| 159 // an arbitrarily long amount of time to interact with. | 187 // an arbitrarily long amount of time to interact with. |
| 160 // If |account_info| is null, it implies that there was an error in the | 188 // If |account_info| is null, it implies that there was an error in the |
| 161 // process. | 189 // process. |
| 162 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); | 190 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
| 163 }; | 191 }; |
| OLD | NEW |