| 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: 6 | 5 // Next MinVersion: 7 |
| 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: 4 |
| 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 |
| 78 // Chrome login account type is an Active Directory account. |
| 79 ACTIVE_DIRECTORY_ACCOUNT = 3, |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 // The necessary information for Android to sign in and provision itself. | 82 // The necessary information for Android to sign in and provision itself. |
| 80 struct AccountInfo { | 83 struct AccountInfo { |
| 81 // The authorization code that can be used in Android to sign in. If it is | 84 // The authorization code that can be used in Android to sign in when |
| 82 // null, sign-in will be skipped. | 85 // account_type is USER_ACCOUNT or ROBOT_ACCOUNT. If it is null in these |
| 83 string? auth_code; | 86 // cases, sign-in will be skipped. |
| 87 string? auth_code@0; |
| 88 |
| 89 // If account_type is ACTIVE_DIRECTORY_ACCOUNT, this contains an enrollment |
| 90 // token for a Managed Google Play account. If it is null in this case, |
| 91 // sign-in will be skipped. |
| 92 [MinVersion=6] string? enrollment_token@3; |
| 84 | 93 |
| 85 // The type of Chrome account to provision. | 94 // The type of Chrome account to provision. |
| 86 ChromeAccountType account_type; | 95 ChromeAccountType account_type@1; |
| 87 | 96 |
| 88 // Whether the account is managed from Chrome OS. | 97 // Whether the account is managed from Chrome OS. |
| 89 bool is_managed; | 98 bool is_managed@2; |
| 90 }; | 99 }; |
| 91 | 100 |
| 92 // Next Method ID: 7. | 101 // Next Method ID: 7. |
| 93 interface AuthHost { | 102 interface AuthHost { |
| 94 // Notifies Chrome that the sign-in is completed successfully. | 103 // Notifies Chrome that the sign-in is completed successfully. |
| 95 [MinVersion=2] OnSignInComplete@2(); | 104 [MinVersion=2] OnSignInComplete@2(); |
| 96 // Notifies Chrome that the sign-in fails to complete and provides failure | 105 // Notifies Chrome that the sign-in fails to complete and provides failure |
| 97 // reason. | 106 // reason. |
| 98 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); | 107 [MinVersion=2] OnSignInFailed@3(ArcSignInFailureReason reason); |
| 99 // Asynchronously requests an authorization code, as well as the account | 108 // Asynchronously requests an authorization code, as well as the account |
| (...skipping 22 matching lines...) Expand all Loading... |
| 122 Init@0(AuthHost host_ptr); | 131 Init@0(AuthHost host_ptr); |
| 123 | 132 |
| 124 // Callback from RequestAccountInfo. This cannot be a normal callback since | 133 // Callback from RequestAccountInfo. This cannot be a normal callback since |
| 125 // the result can sometimes take a few minutes in some cases (Kiosk mode), | 134 // 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 | 135 // 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. | 136 // an arbitrarily long amount of time to interact with. |
| 128 // If |account_info| is null, it implies that there was an error in the | 137 // If |account_info| is null, it implies that there was an error in the |
| 129 // process. | 138 // process. |
| 130 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); | 139 [MinVersion=5] OnAccountInfoReady(AccountInfo? account_info); |
| 131 }; | 140 }; |
| OLD | NEW |