Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // <code>chrome.cryptotokenPrivate</code> API that provides hooks to Chrome to | |
| 6 // be used by cryptotoken component extension. | |
| 7 [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.
| |
| 8 | |
| 9 // Possible results from requesting user permission. | |
| 10 enum PermissionResult { | |
| 11 // User expclitly allowed | |
|
juanlang (chromium.org)
2014/12/10 01:39:05
Nit: s/expclitly/explicitly/
| |
| 12 ALLOWED, | |
| 13 // User explicitly denied | |
| 14 DENIED, | |
| 15 // Inconclusive, e.g. the tab was closed or navigated away | |
| 16 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.
| |
| 17 }; | |
| 18 | |
| 19 // Callback for permission prompt | |
| 20 callback PermissionCallback = void(PermissionResult result); | |
| 21 | |
| 22 // Explicitly gathers approval from the user that an origin in a tab is allowe d | |
|
not at google - send to devlin
2014/12/05 19:07:55
80 chars?
Arnar Birgisson
2014/12/11 20:12:52
Done.
| |
| 23 // to talk to their security keys. This may be used e.g. before registering a | |
| 24 // key, since it creates a stable identifier for that particular key, even | |
| 25 // across browser instances. | |
| 26 // |tabId| is the tab id from the chrome.tabs API, and |securityOrigin| is the | |
| 27 // origin as seen by the extension, to verify that it is correct and has not | |
| 28 // been navigated away from. | |
| 29 interface Functions { | |
| 30 static void requestPermission(long tabId, | |
| 31 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
| |
| 32 PermissionCallback callback); | |
| 33 }; | |
| 34 }; | |
| OLD | NEW |