Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(921)

Unified Diff: components/password_manager/content/public/interfaces/credential_manager.mojom

Issue 1762603002: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Impl done, unit_tests and browser_tests not ready yet Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+};

Powered by Google App Engine
This is Rietveld 408576698