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

Unified Diff: chrome/common/extensions/api/cryptotoken_private.idl

Issue 766303003: A private API for the cryptotoken component extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/cryptotoken_private.idl
diff --git a/chrome/common/extensions/api/cryptotoken_private.idl b/chrome/common/extensions/api/cryptotoken_private.idl
new file mode 100644
index 0000000000000000000000000000000000000000..4ffc40eeb39a2ca00090c11f8cd20790ea359bfd
--- /dev/null
+++ b/chrome/common/extensions/api/cryptotoken_private.idl
@@ -0,0 +1,34 @@
+// Copyright 2014 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.
+
+// <code>chrome.cryptotokenPrivate</code> API that provides hooks to Chrome to
+// be used by cryptotoken component extension.
+[nodoc] namespace cryptotokenPrivate {
not at google - send to devlin 2014/12/05 19:07:56 nodoc not necessary, so long as you don't add an H
Arnar Birgisson 2014/12/11 20:12:53 Done.
+
+ // Possible results from requesting user permission.
+ enum PermissionResult {
+ // User expclitly allowed
juanlang (chromium.org) 2014/12/10 01:39:05 Nit: s/expclitly/explicitly/
+ ALLOWED,
+ // User explicitly denied
+ DENIED,
+ // Inconclusive, e.g. the tab was closed or navigated away
+ UNKNOWN
not at google - send to devlin 2014/12/05 17:59:54 I would call this something other than UNKNOWN, be
Arnar Birgisson 2014/12/05 18:28:02 Good point. Does "DISMISSED" capture it?
not at google - send to devlin 2014/12/05 19:07:56 It does, SGTM.
Arnar Birgisson 2014/12/11 20:12:53 Done.
+ };
+
+ // Callback for permission prompt
+ callback PermissionCallback = void(PermissionResult result);
+
+ // Explicitly gathers approval from the user that an origin in a tab is allowed
not at google - send to devlin 2014/12/05 19:07:55 80 chars?
Arnar Birgisson 2014/12/11 20:12:52 Done.
+ // to talk to their security keys. This may be used e.g. before registering a
+ // key, since it creates a stable identifier for that particular key, even
+ // across browser instances.
+ // |tabId| is the tab id from the chrome.tabs API, and |securityOrigin| is the
+ // origin as seen by the extension, to verify that it is correct and has not
+ // been navigated away from.
+ interface Functions {
+ static void requestPermission(long tabId,
+ DOMString securityOrigin,
not at google - send to devlin 2014/12/05 17:59:54 and I would make this an object, for backwards com
Arnar Birgisson 2014/12/11 20:12:52 Backward compatibility with what? Should only be c
+ PermissionCallback callback);
+ };
+};
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698