- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / api / echo_private.json
1 // Copyright (c) 2012 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 [
6   {
7     "namespace": "echoPrivate",
8     "compiler_options": {
9       "implemented_in": "chrome/browser/chromeos/extensions/echo_private_api.h"
10     },
11     "description": "none",
12     "platforms": ["chromeos"],
13     "functions": [
14       {
15         "name": "setOfferInfo",
16         "description": "Sets the offer info in Local State.",
17         "type": "function",
18         "parameters": [
19           {
20             "name": "id",
21             "type": "string",
22             "description": "The service id of the echo offer."
23           },
24           {
25             "name": "offerInfo",
26             "type": "object",
27             "additionalProperties": { "type": "any" },
28             "description": "The offer info."
29           }
30         ]
31       },
32       {
33         "name": "getOfferInfo",
34         "description": "Check in Local State for the offer info.",
35         "type": "function",
36         "parameters": [
37           {
38             "name": "id",
39             "type": "string",
40             "description": "The service id of the offer eligibility check."
41           },
42           {
43             "name": "callback",
44             "type": "function",
45             "parameters": [
46               {
47                 "name": "result",
48                 "type": "object",
49                 "additionalProperties": { "type": "any" },
50                 "description": "The returned offer info. If the offer info is not available, api will raise error."
51               }
52             ]
53           }
54         ]
55       },
56       {
57         "name": "getRegistrationCode",
58         "description": "Get the group or coupon code from underlying storage.",
59         "type": "function",
60         "parameters": [
61           {
62             "name": "type",
63             "type": "string",
64             "description": "Type of coupon code requested to be read (coupon or group)."
65           },
66           {
67             "name": "callback",
68             "type": "function",
69             "parameters": [
70               {
71                 "name": "result",
72                 "type": "string",
73                 "description" : "The coupon code."
74               }
75             ]
76           }
77         ]
78       },
79       {
80         "name": "getOobeTimestamp",
81         "description": "Get the OOBE timestamp.",
82         "type": "function",
83         "parameters": [
84           {
85             "name": "callback",
86             "type": "function",
87             "parameters": [
88               {
89                 "name": "result",
90                 "type": "string",
91                 "description" : "The OOBE timestamp."
92               }
93             ]
94           }
95         ]
96       },
97       {
98         "name": "getUserConsent",
99         "description": "If device policy allows user to redeem offer, displays a native dialog asking user for a consent to verify device's eligibility for the offer. If the device policy forbids user to redeem offers, displays a native dialog informing user the offer redeeming is disabled.",
100         "type": "function",
101         "parameters": [
102           {
103             "name": "consentRequester",
104             "description": "Information about the service requesting user consent.",
105             "type": "object",
106             "properties": {
107               "serviceName": {
108                 "type": "string",
109                 "minLength": 1,
110                 "description": "User friendly name of the service that is requesting the consent."
111               },
112               "origin": {
113                 "type": "string",
114                 "description": "URL origin of the service requesting the consent."
115               }
116             }
117           },
118           {
119             "name": "callback",
120             "type": "function",
121             "parameters": [
122               {
123                 "name": "result",
124                 "type": "boolean",
125                 "description": "Whether the user consent was given."
126               }
127             ]
128           }
129         ]
130       }
131     ]
132   }
133 ]