| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a JSON schema includes an array of objects PopulateArrayFromList
calls a specialized PopulateItem instance for the generated object
type. When compiled with generate_error_messages=True the generated
type's Populate method expects to receive an error parameter. This
patch adds versions of the PopulateArrayFromList and PopulateItem
functions that pass through and provide that parameter.
This capability is required for a new manifest key that will include
an array of objects being added as part of issue 468955.
Review URL: https://codereview.chromium.org/1128523003
Cr-Commit-Position: refs/heads/master@{#328471}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change enables ArrayBuffer[] in IDLs / json-schema descriptions of extension APIs.
This affects the code generated from these descriptions:
The C++ members (and arguments to the ::Create functions) that refer to binary values are now represented by std::vector<char> instead of std::string.
All usages are adapted in this CL.
While there, this change updates the affected code parts
- to use vector_as_array where it makes sense
- unnecessary copies are removed where easily possible
- and range based assigns ( ::assign(InputIterator first, InputIterator last) or the same with c'tors) are uniformly used.
BUG=448383
TBR=stevenjb@chromium.org (chromeos/dbus was reviewed by bartfab@)
Review URL: https://codereview.chromium.org/820673004
Cr-Commit-Position: refs/heads/master@{#312183}
|
|
|
|
|
|
|
|
|
|
|
| |
There were several GetItemFromList functions that extract an element from a ListValue and converted it.
This change consolidates the list access into a single place and simplifies the GetItemFromList to the conversion only (renamed to PopulateItem).
No functional change.
Review URL: https://codereview.chromium.org/851673003
Cr-Commit-Position: refs/heads/master@{#312082}
|
|
|
|
|
|
|
|
|
|
| |
BUG=88666
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/116543010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242440 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
src/tools/json_schema_compiler: Do not use Value::Create*.
BUG=160586
Review URL: https://chromiumcodereview.appspot.com/22885002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217444 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provides the ability to generate error messages within schema-compiled code for ease of debugging.
Error messages may be disabled by adding a 'generate_error_messages' property to json schema, e.g. "generate_error_messages": false
Error generation mostly written by Aaron Jacobs (https://codereview.chromium.org/16462004/).
BUG=234834
Review URL: https://chromiumcodereview.appspot.com/22228002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217118 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This makes sync and net compile with no "using *Value".
BUG=
Review URL: https://codereview.chromium.org/17034006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207907 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
support the full range of JSON/IDL features, improve the interface of generated
code, and improve generated code formatting, notably:
* Make "choices" generate a struct containing each possible type, rather than
multiple fields with different names plus and enum. This makes it possible
to embed choices inside containers - notably within arrays (as in bug).
It also improves optional choices detection.
* Remove the Any C++ type generated by "any", and model it as a base::Value.
* Make "additionalProperties" generated a std::map with the actual types as
values, rather than just a DictionaryValue forcing callers to extract types.
* Fix enum naming, it was unnecessarily including the namespace as a prefix.
R=yoz@chromium.org
BUG=162044
Review URL: https://codereview.chromium.org/11827026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177361 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For problem description and other info please see the BUG page.
This is for ListValue.
BUG=138946
TEST=N/A (no fix & no new feature)
TBR=jar,zelidrag,scottbyer,mpcomplete,darin,achuith,sky,estade,atwilson,grt,thakis,jamesr,hans,sadrul,pastarmovj
Review URL: https://chromiumcodereview.appspot.com/10837044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149819 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support and tests for more json types. Also fixed a number of API jsons.
BUG=
TEST=
Review URL: http://codereview.chromium.org/9491002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124643 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
match the compiler.
BUG=
TEST=
Review URL: http://codereview.chromium.org/9423035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122725 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as miscellaneous improvements to get at least 3 more schema files compiling:
windows, tabs, and the in-progress experimental.declarative.
For description of the generator, see http://codereview.chromium.org/9114036/
BUG=
TEST=
Review URL: http://codereview.chromium.org/9309044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122082 0039d316-1c4b-4281-b951-d872f2087c98
|
|
This is a preliminary code review for a code generator. The tool's purpose is to generate the tedious serialization code that needs to be written when defining a new extensions api. It generates from the json files in chrome/common/extensions/api.
As an example usage, chrome/browser/extensions/extension_permissions_api.cc has been changed to use a class generated from permissions.json.
The tool has been integrated into the build system and generates compiling and working code (for permissions.json at least)
BUG=
TEST=
Review URL: http://codereview.chromium.org/9114036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119405 0039d316-1c4b-4281-b951-d872f2087c98
|