From 770295dc4b14a3c64e0026a249a84c7e5fb23e18 Mon Sep 17 00:00:00 2001 From: "hashimoto@chromium.org" Date: Wed, 25 Jan 2012 10:09:46 +0000 Subject: Add an extension API event about screen brightness change. BUG=chromium-os:20007 TEST=None Review URL: http://codereview.chromium.org/9193005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119042 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/extensions/api/systemPrivate.json | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'chrome/common') diff --git a/chrome/common/extensions/api/systemPrivate.json b/chrome/common/extensions/api/systemPrivate.json index 9f8f007..3c507f1 100644 --- a/chrome/common/extensions/api/systemPrivate.json +++ b/chrome/common/extensions/api/systemPrivate.json @@ -27,6 +27,21 @@ "volume": {"type": "double", "description": "The value of the volume percent. This must be between 0.0 and 100.0."}, "isVolumeMuted": {"type": "boolean", "description": "True if the volume is muted."} } + }, + { + "id": "BrightnessChangeInfo", + "type": "object", + "description": "Information about a change to the screen brightness.", + "properties": { + "brightness": { + "type": "number", + "description": "The value of the current screen brightness in percent, between 0.0 and 100.0." + }, + "userInitiated": { + "type": "boolean", + "description": "Whether this change was initiated by user." + } + } } ], "functions": [ @@ -83,6 +98,18 @@ ] }, { + "name": "onBrightnessChanged", + "type": "function", + "description": "Fired when the screen brightness is changed.", + "parameters": [ + { + "$ref": "BrightnessChangeInfo", + "name": "brightness", + "description": "Information about a change to the screen brightness." + } + ] + }, + { "name": "onScreenUnlocked", "type": "function", "description": "Fired when the screen is unlocked.", -- cgit v1.1