Home | History | Annotate | Download | only in api
      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": "getRegistrationCode",
     16         "description": "Get the group or coupon code from underlying storage.",
     17         "type": "function",
     18         "parameters": [
     19           {
     20             "name": "type",
     21             "type": "string",
     22             "description": "Type of coupon code requested to be read (coupon or group)."
     23           },
     24           {
     25             "name": "callback",
     26             "type": "function",
     27             "parameters": [
     28               {
     29                 "name": "result",
     30                 "type": "string",
     31                 "description" : "The coupon code."
     32               }
     33             ]
     34           }
     35         ]
     36       },
     37       {
     38         "name": "getOobeTimestamp",
     39         "description": "Get the OOBE timestamp.",
     40         "type": "function",
     41         "parameters": [
     42           {
     43             "name": "callback",
     44             "type": "function",
     45             "parameters": [
     46               {
     47                 "name": "result",
     48                 "type": "string",
     49                 "description" : "The OOBE timestamp."
     50               }
     51             ]
     52           }
     53         ]
     54       },
     55       {
     56         "name": "checkAllowRedeemOffers",
     57         "description": "Check if device policy allows users to redeem offers.",
     58         "type": "function",
     59         "parameters": [
     60           {
     61             "name": "callback",
     62             "type": "function",
     63             "parameters": [
     64               {
     65                 "name": "result",
     66                 "type": "boolean",
     67                 "description" : "true if allowed to redeem offers."
     68               }
     69             ]
     70           }
     71         ]
     72       },
     73       {
     74         "name": "getUserConsent",
     75         "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.",
     76         "type": "function",
     77         "parameters": [
     78           {
     79             "name": "consentRequester",
     80             "description": "Information about the service requesting user consent.",
     81             "type": "object",
     82             "properties": {
     83               "serviceName": {
     84                 "type": "string",
     85                 "minLength": 1,
     86                 "description": "User friendly name of the service that is requesting the consent."
     87               },
     88               "origin": {
     89                 "type": "string",
     90                 "description": "URL origin of the service requesting the consent."
     91               }
     92             }
     93           },
     94           {
     95             "name": "callback",
     96             "type": "function",
     97             "parameters": [
     98               {
     99                 "name": "result",
    100                 "type": "boolean",
    101                 "description": "Whether the user consent was given."
    102               }
    103             ]
    104           }
    105         ]
    106       }
    107     ]
    108   }
    109 ]
    110