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 // Use the <code>chrome.instanceID</code> API to access the InstanceID service. | 5 // Use the <code>chrome.instanceID</code> API to access the InstanceID service. |
6 namespace instanceID { | 6 namespace instanceID { |
7 // Parameters for getToken. | 7 // Parameters for getToken. |
8 dictionary GetTokenParams { | 8 dictionary GetTokenParams { |
9 // Identifies the entity that is authorized to access resources associated | 9 // Identifies the entity that is authorized to access resources associated |
10 // with this Instance ID. It can be another Instance ID or a project ID. | 10 // with this Instance ID. It can be another Instance ID or a project ID. |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 // The scope that is passed for obtaining a token. | 27 // The scope that is passed for obtaining a token. |
28 DOMString scope; | 28 DOMString scope; |
29 }; | 29 }; |
30 | 30 |
31 // |instanceID| : The Instance ID assigned to the app. | 31 // |instanceID| : The Instance ID assigned to the app. |
32 callback GetIDCallback = void(DOMString instanceID); | 32 callback GetIDCallback = void(DOMString instanceID); |
33 | 33 |
34 // |creationTime| : The time when the Instance ID has been generated, | 34 // |creationTime| : The time when the Instance ID has been generated, |
35 // represented in milliseconds since the epoch. | 35 // represented in milliseconds since the epoch. |
36 callback GetCreationTimeCallback = void(long creationTime); | 36 callback GetCreationTimeCallback = void(double creationTime); |
37 | 37 |
38 // |token| : The token assigned by the requested service. | 38 // |token| : The token assigned by the requested service. |
39 callback GetTokenCallback = void(DOMString token); | 39 callback GetTokenCallback = void(DOMString token); |
40 | 40 |
41 callback DeleteIDCallback = void(); | 41 callback DeleteIDCallback = void(); |
42 | 42 |
43 callback DeleteTokenCallback = void(); | 43 callback DeleteTokenCallback = void(); |
44 | 44 |
45 interface Functions { | 45 interface Functions { |
46 // Retrieves an identifier for the app instance. The instance ID will be | 46 // Retrieves an identifier for the app instance. The instance ID will be |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 static void deleteID(DeleteIDCallback callback); | 80 static void deleteID(DeleteIDCallback callback); |
81 }; | 81 }; |
82 | 82 |
83 interface Events { | 83 interface Events { |
84 // Fired when all the granted tokens need to be refreshed. The Instance ID | 84 // Fired when all the granted tokens need to be refreshed. The Instance ID |
85 // also needs to be refreshed when updateID is set to true. | 85 // also needs to be refreshed when updateID is set to true. |
86 // |updateID| : Instance ID also needs to be refreshed. | 86 // |updateID| : Instance ID also needs to be refreshed. |
87 static void onTokenRefresh(boolean updateID); | 87 static void onTokenRefresh(boolean updateID); |
88 }; | 88 }; |
89 }; | 89 }; |
OLD | NEW |