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": "systemPrivate",
      8     "description": "none",
      9     "types": [
     10       {
     11         "id": "UpdateStatus",
     12         "type": "object",
     13         "description": "Information about the system update.",
     14         "properties": {
     15           "state": {
     16             "type": "string",
     17             "enum": ["NotAvailable", "Updating", "NeedRestart"],
     18             "description": "State of system update.  NotAvailable when there is no available update or the update system is in error state, Updating when a system update is in progress, NeedRestart when a system update is finished and restart is needed."
     19           },
     20           "downloadProgress": {
     21             "type": "number",
     22             "description": "Value between 0 and 1 describing the progress of system update download.  This value will be set to 0 when |state| is NotAvailable, 1 when NeedRestart."
     23           }
     24         }
     25       },
     26       {
     27         "id": "VolumeInfo",
     28         "type": "object",
     29         "description": "Information about the volume.",
     30         "properties": {
     31           "volume": {"type": "number", "description": "The value of the volume percent. This must be between 0.0 and 100.0."},
     32           "isVolumeMuted": {"type": "boolean", "description": "True if the volume is muted."}
     33         }
     34       },
     35       {
     36         "id": "BrightnessChangeInfo",
     37         "type": "object",
     38         "description": "Information about a change to the screen brightness.",
     39         "properties": {
     40           "brightness": {
     41             "type": "number",
     42             "description": "The value of the current screen brightness in percent, between 0.0 and 100.0."
     43           },
     44           "userInitiated": {
     45             "type": "boolean",
     46             "description": "Whether this change was initiated by user."
     47           }
     48         }
     49       }
     50     ],
     51     "functions": [
     52       {
     53         "name": "getIncognitoModeAvailability",
     54         "type": "function",
     55         "description": "Returns whether the incognito mode is enabled, disabled or forced",
     56         "parameters": [
     57           {
     58             "name": "callback",
     59             "type": "function",
     60             "description": "Called with the result.",
     61             "parameters": [
     62               {
     63                 "name": "value",
     64                 "type": "string",
     65                 "enum": ["enabled", "disabled", "forced"],
     66                 "description": "Exposes whether the incognito mode is available to windows. One of 'enabled', 'disabled' (user cannot browse pages in Incognito mode), 'forced' (all pages/sessions are forced into Incognito mode)."
     67               }
     68             ]
     69           }
     70         ]
     71       },
     72       {
     73         "name": "getUpdateStatus",
     74         "type": "function",
     75         "description": "Gets information about the system update.",
     76         "parameters": [
     77           {
     78             "type": "function",
     79             "name": "callback",
     80             "parameters": [
     81               {
     82                 "$ref": "UpdateStatus",
     83                 "name": "status",
     84                 "description": "Details of the system update"
     85               }
     86             ]
     87           }
     88         ]
     89       },
     90       {
     91         "name": "getApiKey",
     92         "type": "function",
     93         "description": "Gets Chrome's API key to use for requests to Google services.",
     94         "parameters": [
     95           {
     96             "type": "function",
     97             "name": "callback",
     98             "parameters": [
     99               {
    100                 "name": "key",
    101                 "type": "string",
    102                 "description": "The API key."
    103               }
    104             ]
    105           }
    106         ]
    107       }
    108     ],
    109     "events": [
    110       {
    111         "name": "onVolumeChanged",
    112         "type": "function",
    113         "description": "Fired when the volume is changed.",
    114         "parameters": [
    115           {
    116             "$ref": "VolumeInfo",
    117             "name": "volume",
    118             "description": "Information about the current state of the system volume control, including whether it is muted."
    119           }
    120         ]
    121       },
    122       {
    123         "name": "onBrightnessChanged",
    124         "type": "function",
    125         "description": "Fired when the screen brightness is changed.",
    126         "parameters": [
    127           {
    128             "$ref": "BrightnessChangeInfo",
    129             "name": "brightness",
    130             "description": "Information about a change to the screen brightness."
    131           }
    132         ]
    133       },
    134       {
    135         "name": "onScreenUnlocked",
    136         "type": "function",
    137         "description": "Fired when the screen is unlocked.",
    138         "parameters": []
    139       },
    140       {
    141         "name": "onWokeUp",
    142         "type": "function",
    143         "description": "Fired when the device wakes up from sleep.",
    144         "parameters": []
    145       }
    146     ]
    147   }
    148 ]
    149