diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 05:14:15 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-17 05:14:15 +0000 |
commit | 1631f7c651fbc7f4460a852126f545afc5513531 (patch) | |
tree | 7176f3052f69c0c0debf48172d533f9acc4c83d3 /chrome/common/web_app_schema.json | |
parent | 42a17153ee389574560b91b185bcec6c4db5b5c3 (diff) | |
download | chromium_src-1631f7c651fbc7f4460a852126f545afc5513531.zip chromium_src-1631f7c651fbc7f4460a852126f545afc5513531.tar.gz chromium_src-1631f7c651fbc7f4460a852126f545afc5513531.tar.bz2 |
Implement web app definition parsing.
This required moving some code from webkit/glue to
chrome/common/web_apps.cc so that it could rely on
chrome/common/json_schema_validator.h.
BUG=49233
TEST=Convered by unit tests.
Review URL: http://codereview.chromium.org/4979003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/web_app_schema.json')
-rw-r--r-- | chrome/common/web_app_schema.json | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/chrome/common/web_app_schema.json b/chrome/common/web_app_schema.json new file mode 100644 index 0000000..fe23966 --- /dev/null +++ b/chrome/common/web_app_schema.json @@ -0,0 +1,58 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This file contains the schema for web app defintion files. + +{ + "type": "object", + "properties": { + // TODO(aa): Need to figure out what max length the store is using for name + // and description. + "name": { + "type": "string", + "minLength": 1, + "maxLength": 45 + }, + "description": { + "type": "string", + "maxLength": 132, + "optional": true + }, + "launch_url": { + "type": "string", + "minLength": 1 + }, + "launch_container": { + "enum": ["tab", "panel"], + "optional": true + }, + // TODO(aa): We had problems with a simple array of strings in extensions. + // Consider something else. + "permissions": { + "type": "array", + "optional": true, + "items": { + "type": "string", + "minLength": 1 + } + }, + "urls": { + "type": "array", + "optional": true, + "items": { + "type": "string", + "minLength": 1 + } + }, + "icons": { + "type": "object", + "optional": true, + "properties": { + "16": { "optional": true, "type": "string", "minLength": 1 }, + "48": { "optional": true, "type": "string", "minLength": 1 }, + "128": { "optional": true, "type": "string", "minLength": 1 } + } + } + } +} |