Chromium Code Reviews| Index: components/password_manager/content/public/interfaces/credential_manager.mojom |
| diff --git a/components/password_manager/content/public/interfaces/credential_manager.mojom b/components/password_manager/content/public/interfaces/credential_manager.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef5dc1f98ef7c7ea0a5e0243114100ac59f879c3 |
| --- /dev/null |
| +++ b/components/password_manager/content/public/interfaces/credential_manager.mojom |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module password_manager.mojom; |
| + |
| +import "url/mojo/origin.mojom"; |
| + |
| +enum CredentialType { |
| + EMPTY, |
| + PASSWORD, |
| + FEDERATED |
| +}; |
| + |
| +enum CredentialManagerError { |
| + SUCCESS, |
| + DISABLED, |
| + PENDINGREQUEST, |
| + PASSWORDSTOREUNAVAILABLE, |
| + UNKNOWN |
| +}; |
| + |
| +struct CredentialInfo { |
| + CredentialType type; |
| + string id; |
| + string name; |
| + string icon; |
| + string password; |
| + url.mojom.Origin federation; |
| +}; |
| + |
| +interface CredentialManager { |
| + // Store credential. For navigator.credentials.store(). |
| + Store(CredentialInfo credential) => (); |
| + |
| + // Require user mediation. For navigator.credentials.requireUserMediation(). |
| + RequireUserMediation() => (); |
| + |
| + // Request Credential. For navigator.credentials.get(). |
| + // The result callback will return a non-null and valid CredentialInfo if succeeded, |
|
vabr (Chromium)
2016/03/09 16:26:29
I'm not sure about the indentation rules for .mojo
leonhsl(Using Gerrit)
2016/03/10 06:42:41
Done. Keep lines length within 80 characters and m
|
| + // or null with a CredentialManagerError if failed. |
| + Get(bool zero_click_only, |
| + bool include_passwords, |
| + array<string> federations) => (CredentialManagerError error, CredentialInfo? credential); |
| +}; |