0
Commit Graph

62 Commits

Author SHA1 Message Date
Takuto Ikuta
fe9de62a53 json_schema_compiler: drop Python2 support
We use Python3 only in chromium build now.

Bug: 1406153
Change-Id: I345bb18e3d2ccfd74126a46cf8498c4fce9e2d79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4074762
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1090728}
2023-01-10 07:48:43 +00:00
Avi Drissman
dfd8808526 Update copyright headers in testing/, tools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c95.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: I3a8a7b150e7bd64690534727150646081df50439
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3900697
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1047644}
2022-09-15 20:11:09 +00:00
Toshiaki Tanaka
62194bf0c7 Fix build fail due to encoding error
In Japanese version Windows, python opens file in cp932 codec as a
default codec.
The idl_schema.py opens a file without specifying the encoding, so
python opened a file as cp932 codec, but it was actually utf-8 encoded.
This is the cause of the build fail.
I fixed the error by specifying 'utf-8' encoding when opening a file.

Bug: 1211760
Change-Id: Ibd3ab33cf3ea04d39f7481a8c39083d0627975ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2962174
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Toshiaki Tanaka <zokutyou2@gmail.com>
Cr-Commit-Position: refs/heads/master@{#893309}
2021-06-17 05:42:11 +00:00
Ari Chivukula
f89535e101 Python3Migration-PresubmitChecks: json_schema_compiler
This CL is part of a larger effort to deprecate python2 in PRESUBMIT.
json_schema_compiler's PRESUBMIT file will now run unit tests in
python3. In order to do this, every file's #! must specify python3
(in this dir, most were ambiguous and simply said python).

Bug: 1212101
Change-Id: I870ac1cc70325c79bccfd3df3d37432f24b97f54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2921953
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#887392}
2021-05-27 23:36:06 +00:00
Tim Judkins
5d78c63f74 [Extensions] Remove nodefine from schemas and the APIs that used it
The nodefine property was added over 4 years ago when deprecating some
Media Gallery APIs. This CL removes those deprecated APIs, along with
the nodefine property.

Bug: 1136659
Change-Id: Idf087287926903fbaa83ee13c2340320043fc038
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462254
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Tim Judkins <tjudkins@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816306}
2020-10-12 21:32:12 +00:00
Raul Tambre
eed5f378a6 Improve JSON schema compiler Python 3 support
The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 941669
Change-Id: I219d20cc10e081a23db66515fe576a80e63df3f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1556793
Auto-Submit: Raul Tambre <raul@tambre.ee>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#649173}
2019-04-09 17:48:03 +00:00
rdevlin.cronin
227d70cd98 [Schema Compiler] Separate out SchemaLoader and namespace resolving
The SchemaLoader name implies that the object is used for loading
schemas, but for some reason also has logic to resolve a type and
namespace. Move this into a separate NamespaceResolver file to
make it easier to reuse SchemaLoader.

BUG=None

Review-Url: https://codereview.chromium.org/2596583002
Cr-Commit-Position: refs/heads/master@{#440201}
2016-12-21 20:26:35 +00:00
tommycli
d3f29202a4 Media Galleries Partial Deprecation: Remove scan functionality.
Removes ~4100 sloc, and 50k off the binary size.

BUG=542912

Review URL: https://codereview.chromium.org/1695563002

Cr-Commit-Position: refs/heads/master@{#378624}
2016-03-02 00:24:20 +00:00
stevenjb
f0e8cce513 Add js_interface_generator for generating extensions interfaces
BUG=563744

Review URL: https://codereview.chromium.org/1488773003

Cr-Commit-Position: refs/heads/master@{#364423}
2015-12-10 19:28:26 +00:00
kalman
e58e622314 Generate all extension schema namespaces as "api" and instead vary the generated bundle names.
At the moment the 3 modules that use extension API schemas, those in
extensions/common/api, chrome/common/extensions/api, and extensions/shell/api,
are generated with different C++ namespaces: "core_api", "api", and
"shell::api" respectively.

This is a pointless distinction to make since as far as JS is concerned they
must all go on the window.chrome object, therefore namespace conflicts are
impossible. It just ends up adding code noise.

The only problem it solves is that all bundle compiles are generated to the
same name, "GeneratedSchemas" and "GeneratedFunctionRegistry". This patch
solves that a different way, by adding a JSON schema compiler option to give
those generated classes a prefix such that they are "GeneratedSchemas",
"ChromeGeneratedSchemas", and "ShellGeneratedSchemas" respectively.
This lets us to a global substitution from "core_api" to just "api".

R=rockot@chromium.org, dpranke@chromium.org
TBR=ben@chromium.org

Review URL: https://codereview.chromium.org/1226353004

Cr-Commit-Position: refs/heads/master@{#340119}
2015-07-23 18:28:16 +00:00
rdevlin.cronin
00f1fc22bf [Extensions API] Remove inline enums
Remove all inlined enums from extension APIs.

BUG=472279
TBR=derat@chromium.org (mechanical changes to chrome/browser/chromeos/app_mode/kiosk_app_update_service.cc and chrome/browser/ui/ash/ash_keyboard_controller_proxy.cc)

Review URL: https://codereview.chromium.org/1055673002

Cr-Commit-Position: refs/heads/master@{#323912}
2015-04-06 17:35:43 +00:00
rdevlin.cronin
8c3a458ed2 Generate externs automatically from json/idl files
Continued from https://codereview.chromium.org/511943003/.

BUG=469920

Review URL: https://codereview.chromium.org/1006373003

Cr-Commit-Position: refs/heads/master@{#322016}
2015-03-24 17:08:16 +00:00
benwells
0eeb6a9a3b Remove dart generator code from json schema compiler.
This isn't used by anything.

BUG=448704

Review URL: https://codereview.chromium.org/843213003

Cr-Commit-Position: refs/heads/master@{#312343}
2015-01-21 14:11:14 +00:00
thestig
b179975134 Cleanup most pylint errors in json_schema_compiler.
Review URL: https://codereview.chromium.org/849103005

Cr-Commit-Position: refs/heads/master@{#311761}
2015-01-15 23:20:10 +00:00
lfg
8a1bee36d9 - Add support for references in different paths in apis.
- Move ImageDetails from chrome to extensions.

BUG=352290

Review URL: https://codereview.chromium.org/487533005

Cr-Commit-Position: refs/heads/master@{#292567}
2014-08-29 03:58:01 +00:00
yoz
774dcda2d3 Reland 596ff54335b2a1b393af10657bc4945114f3beed - Split API bundle generation steps
* Fixed in this version: dependencies for *_api_registration on *_api.

Split bundle generation steps so that API registration is generated in browser, not common.

We now have schema generation, schema bundle generation, and schema bundle registration generation; the last of these is generated in a separate build target and output to browser rather than common.

Fix a couple of dangling gyp issues also.

BUG=405226
TBR=scottmg@chromium.org,sky@chromium.org

Review URL: https://codereview.chromium.org/513633002

Cr-Commit-Position: refs/heads/master@{#292090}
2014-08-27 03:33:52 +00:00
Albert J. Wong
8f65982274 Revert "Split bundle generation steps so that API registration is generated in browser, not common."
Causing build failure in Android due to failed include for extensions/common/api/runtime.h.

This reverts commit 3b70ef14be.

BUG=none
TBR=yoz

Review URL: https://codereview.chromium.org/506253003

Cr-Commit-Position: refs/heads/master@{#292059}
2014-08-27 01:14:22 +00:00
yoz
3b70ef14be Split bundle generation steps so that API registration is generated in browser, not common.
We now have schema generation, schema bundle generation, and schema bundle registration generation; the last of these is generated in a separate build target and output to browser rather than common.

Fix a couple of dangling gyp issues also.

BUG=405226
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/489153003

Cr-Commit-Position: refs/heads/master@{#292057}
2014-08-27 00:52:34 +00:00
kalman@chromium.org
8d368d625b Make the root_namespace argument to json_schema_compiler.gypi a string
pattern rather than a prefix.

BUG=370952
R=yoz@chromium.org
TBR=dmazzoni@chromium.org

Review URL: https://codereview.chromium.org/437883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287488 0039d316-1c4b-4281-b951-d872f2087c98
2014-08-05 08:02:06 +00:00
sammc@chromium.org
8f90dc4957 Remove the Pepper IDL generator from JSON schema compiler.
Review URL: https://codereview.chromium.org/422783002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286118 0039d316-1c4b-4281-b951-d872f2087c98
2014-07-29 08:02:29 +00:00
rkc@chromium.org
c9fa3e6cd7 Chromium side changes to add the ledger API.
R=isherman@chromium.org, kalman@chromium.org
BUG=346488

Review URL: https://codereview.chromium.org/232183002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269820 0039d316-1c4b-4281-b951-d872f2087c98
2014-05-12 18:17:44 +00:00
rockot@chromium.org
704a900dae Add an implementation path option to json_schema_compiler
This replaces the hard-coded chrome/browser/extensions/api path with
a command-line option (impl_dir).

BUG=349019

Review URL: https://codereview.chromium.org/183763032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254995 0039d316-1c4b-4281-b951-d872f2087c98
2014-03-05 10:11:19 +00:00
dtseng@chromium.org
70e263e2fb Generate ax enums from idl.
This cl lays the groundwork for sharing all ax enums between platfrom accessibility and extension accessibility.

BUG=

Review URL: https://codereview.chromium.org/143473003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249993 0039d316-1c4b-4281-b951-d872f2087c98
2014-02-09 10:45:09 +00:00
sammc@chromium.org
c8bbd2186e Add a Pepper IDL generator to the JSON schema compiler.
BUG=326867

Review URL: https://codereview.chromium.org/101483003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240297 0039d316-1c4b-4281-b951-d872f2087c98
2013-12-12 13:28:02 +00:00
yoz@chromium.org
26e1e9ec10 JSON schema compiler: remove SOURCE_BASE_PATH hack from bundle generator.
Review URL: https://codereview.chromium.org/77063004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236308 0039d316-1c4b-4281-b951-d872f2087c98
2013-11-20 21:44:29 +00:00
msimonides@opera.com
43294450f9 Make SchemaLoader independent of current working directory.
The SchemaLoader looks for schema files in the current directory. This
isn't very robust and may cause problems for other products than
Chromium if they run the script from a GYP file in another directory.

The SchemaLoader is supplied two arguments now: the path to API files
relative to the root path (for use in #includes) and the regular path
to API files (for file access).

BUG=

Review URL: https://codereview.chromium.org/23534063

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225977 0039d316-1c4b-4281-b951-d872f2087c98
2013-09-30 15:29:34 +00:00
DHNishi@gmail.com
baed4d3ddf Clean up JSON Schema Compiler's pylint errors.
Review URL: https://chromiumcodereview.appspot.com/23549025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222389 0039d316-1c4b-4281-b951-d872f2087c98
2013-09-10 23:14:04 +00:00
DHNishi@gmail.com
1dcf107569 Fix a typo (missing space) in JSON Schema Compiler's help prompt.
TBR=kalman@chromium.org
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/23707013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220678 0039d316-1c4b-4281-b951-d872f2087c98
2013-08-30 22:27:02 +00:00
cduvall@chromium.org
db20a22fa6 Lazily load extension API schemas
Now all the extensions API schemas are loaded lazily, to
avoid the memory overhead of loading them upfront. Also,
the API feature system now can use the URL to determine
availability of the API. APIs can now be checked for
availability separately, without needing to load all the APIs.


Review URL: https://chromiumcodereview.appspot.com/12522004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190058 0039d316-1c4b-4281-b951-d872f2087c98
2013-03-23 18:49:30 +00:00
ncj674@motorola.com
9235aaa641 JSON Compiler should convert the namespace value in lowerCamelCase to unix_name for the referenced dependency.
BUG=159265

Review URL: https://chromiumcodereview.appspot.com/12283025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184263 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-23 02:33:32 +00:00
sashab@chromium.org
cb80af8ba2 Added unit tests for the Dart Chrome.* API wrappers, testing the Dart output mode from JSON Schema Compiler.
The physical tests I've added are initial dummies - kalman, please take a look at the *structure* of the test setup. It feels like there is a lot of repetition of test names, but I like using python's unittest framework so it runs as a presubmit check. Any hints?

I have a lot more tests I'd like to add.

Note that there needs to be functionality to disable tests, e.g. there will need to be some tests that will fail from the IDL return value type bug (https://code.google.com/p/chromium/issues/detail?id=170837).

Thanks,

Sasha

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=183709

Review URL: https://chromiumcodereview.appspot.com/12218151

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183931 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-22 00:27:21 +00:00
nhiroki@chromium.org
1e7c809033 Revert 183709
> Added unit tests for the Dart Chrome.* API wrappers, testing the Dart output mode from JSON Schema Compiler.
> 
> The physical tests I've added are initial dummies - kalman, please take a look at the *structure* of the test setup. It feels like there is a lot of repetition of test names, but I like using python's unittest framework so it runs as a presubmit check. Any hints?
> 
> I have a lot more tests I'd like to add.
> 
> Note that there needs to be functionality to disable tests, e.g. there will need to be some tests that will fail from the IDL return value type bug (https://code.google.com/p/chromium/issues/detail?id=170837).
> 
> Thanks,
> 
> Sasha
> 
> Review URL: https://chromiumcodereview.appspot.com/12218151

TBR=sashab@chromium.org
Review URL: https://codereview.chromium.org/12320030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183751 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-21 05:50:49 +00:00
sashab@chromium.org
ea49b25403 Added unit tests for the Dart Chrome.* API wrappers, testing the Dart output mode from JSON Schema Compiler.
The physical tests I've added are initial dummies - kalman, please take a look at the *structure* of the test setup. It feels like there is a lot of repetition of test names, but I like using python's unittest framework so it runs as a presubmit check. Any hints?

I have a lot more tests I'd like to add.

Note that there needs to be functionality to disable tests, e.g. there will need to be some tests that will fail from the IDL return value type bug (https://code.google.com/p/chromium/issues/detail?id=170837).

Thanks,

Sasha

Review URL: https://chromiumcodereview.appspot.com/12218151

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183709 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-21 01:49:06 +00:00
MHX348@motorola.com
071d96b541 generated_api.h should have its body generated into generated_api.cc
BUG=172050


Review URL: https://chromiumcodereview.appspot.com/12181005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181848 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-12 04:45:41 +00:00
sashab@chromium.org
32096af1d3 Initial commit of the Dart Chrome Extension APIs generators
Modified json_schema_compiler to allow a -l option to specify the language.
Also allowed for a -H option to specify a hooks file, which is currently only
supported for Dart.


Review URL: https://chromiumcodereview.appspot.com/12041098

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180845 0039d316-1c4b-4281-b951-d872f2087c98
2013-02-06 01:29:31 +00:00
calamity@chromium.org
c6abf2bc3d IDL generated extensions code only generate foo_api.h when required
BUG=148545


Review URL: https://chromiumcodereview.appspot.com/12035070

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178751 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-25 04:49:10 +00:00
kalman@chromium.org
4636c837d2 Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it
was only run on IDL files. Clean up all the code which that simplifies.

TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
BUG=141318

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=176015

Review URL: https://codereview.chromium.org/11747025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176236 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-11 02:10:11 +00:00
ricow@chromium.org
758b0b7056 Revert revision 176015
This is a manual revert, drover did not like the deleted files

> Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it
> was only run on IDL files. Clean up all the code which that simplifies.
>
> TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
> BUG=141318
>
> Review URL: https://chromiumcodereview.appspot.com/11747025

TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
Review URL: https://codereview.chromium.org/11778097

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176054 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-10 12:19:33 +00:00
ricow@chromium.org
78acaf6d0a Revert 176047
> Revert 176015
> > Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it
> > was only run on IDL files. Clean up all the code which that simplifies.
> > 
> > TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
> > BUG=141318
> > 
> > Review URL: https://chromiumcodereview.appspot.com/11747025
> 
> This seems to be causing complation failures on release win builders:
> http://chromegw/i/chromium.chrome/builders/Google%20Chrome%20Win/builds/15702
> 
> TBR=kalman@chromium.org
> Review URL: https://codereview.chromium.org/11826048

Drover messed up this revert, reverting it

TBR=ricow@chromium.org
Review URL: https://codereview.chromium.org/11778096

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176051 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-10 11:14:37 +00:00
ricow@chromium.org
85db26ae55 Revert 176015
> Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it
> was only run on IDL files. Clean up all the code which that simplifies.
> 
> TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
> BUG=141318
> 
> Review URL: https://chromiumcodereview.appspot.com/11747025

This seems to be causing complation failures on release win builders:
http://chromegw/i/chromium.chrome/builders/Google%20Chrome%20Win/builds/15702

TBR=kalman@chromium.org
Review URL: https://codereview.chromium.org/11826048

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176047 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-10 10:36:38 +00:00
kalman@chromium.org
3044046b89 Run the JSON Schema Compiler's bundle compilation on JSON files. Previously it
was only run on IDL files. Clean up all the code which that simplifies.

TBR=isherman@chromium.org,battre@chromium.org,akalin@chromium.org
BUG=141318

Review URL: https://chromiumcodereview.appspot.com/11747025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176015 0039d316-1c4b-4281-b951-d872f2087c98
2013-01-10 04:05:55 +00:00
mitchellwrosen@chromium.org
2f30fff337 Update the JSON Schema Compiler to take dependencies of the form type:name.
BUG=135224


Review URL: https://chromiumcodereview.appspot.com/10700039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145235 0039d316-1c4b-4281-b951-d872f2087c98
2012-07-03 01:23:41 +00:00
asargent@chromium.org
a9ead75506 Add support for 'nocompile' to IDL schema compiler.
The json schema stuff already has this support, to skip generation of C++
code for certain functions. Doing the same thing for IDL is slightly 
complicated by the fact that we still want to generate JSON for functions
marked nocompile.

BUG=129080
TEST=includes unit and browser tests


Review URL: https://chromiumcodereview.appspot.com/10435003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138707 0039d316-1c4b-4281-b951-d872f2087c98
2012-05-24 02:08:45 +00:00
cduvall@chromium.org
15a28fd05e Files generated by the JSON schema compiler are named incorrectly
Files are now named like "file_name.h" instead of "fileName.h" or
"file.name.h", and all the JSON files have been renamed.

BUG=125669
TEST=All previous tests for the renamed files


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135077

Review URL: https://chromiumcodereview.appspot.com/10272021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136747 0039d316-1c4b-4281-b951-d872f2087c98
2012-05-12 02:22:21 +00:00
tfarina@chromium.org
2c60cf7081 Revert 135077 - Files generated by the JSON schema compiler are named incorrectly
Files are now named like "file_name.h" instead of "fileName.h" or "file.name.h"

BUG=125669
TEST=All previous tests for the renamed files

This broke Linux and Linux64:

g++: out/Release/obj/gen/chrome/common/extensions/api/experimental.fontSettings.cc: No such file or directory
g++: no input files
make: *** [out/Release/obj.target/api/gen/chrome/common/extensions/api/experimental.fontSettings.o] Error 1

Review URL: http://codereview.chromium.org/10272021

TBR=cduvall@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10348005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135081 0039d316-1c4b-4281-b951-d872f2087c98
2012-05-03 03:35:56 +00:00
cduvall@chromium.org
a9e75251e0 Files generated by the JSON schema compiler are named incorrectly
Files are now named like "file_name.h" instead of "fileName.h" or "file.name.h"

BUG=125669
TEST=All previous tests for the renamed files


Review URL: http://codereview.chromium.org/10272021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135077 0039d316-1c4b-4281-b951-d872f2087c98
2012-05-03 03:14:13 +00:00
cduvall@chromium.org
0ef7f5a1c1 JSON schema compiler can't handle strings as types
JSON schema compiler now supports having strings as types.

Similar to http://crbug.com/122075

BUG=124771
TEST=cpp_type_generator_test.py


Review URL: http://codereview.chromium.org/10206034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134674 0039d316-1c4b-4281-b951-d872f2087c98
2012-05-01 03:58:06 +00:00
gdk@chromium.org
5ef832c85d Make json_schema_compiler resolve type names via resolution rules.
Instead of sharing a single namespace internally for types, makes
json_schema_compiler treat types as their fully-qualified selfs. This allows
two different namespaces to have types with the same name, and to be able to
reference the others' types by a fully-qualified name. This change also causes
namespaces to not be added twice to their CppTypeGenerators.

BUG=119954
TEST=none


Review URL: http://codereview.chromium.org/9834088

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129251 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-27 20:03:23 +00:00
asargent@chromium.org
2fe86eec05 Remove dependence on .json files for IDL-specified extensions/apps APIs
This is an incremental step towards fully IDL-specified API bindings. This
patch adds code which generates JSON based on IDL for the purpose of exposing
bindings to javascript.

BUG=119137
TEST=Code should compile and existing tests should pass.


Review URL: http://codereview.chromium.org/9774001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127908 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-21 05:40:14 +00:00
miket@chromium.org
ae33d3293b Reapply 127159 (http://codereview.chromium.org/9666059) plus important fixes.
Refactor extension_function_dispatcher to extract ExtensionFunctionRegistry.
This allows us to generate an additional code block that takes an ExtensionFunctionRegistry
and asks it to register generated API functions.

Then switch DnsResolve over to get registered this way.

Along the way, notice that DNSResolve is capitalized using an untenable style. Fix that.

Fixes since original 127159:

  - change name of build rule to gen_bundle_api
  - actually add per-file dependencies to .gyp (this was why clean builds
    failed)
  - change 'outputs' to match the emitted filename, fixing a needless
    rebuild problem.
  - split the top-level build action that was a part of
    json_schema_compile.gypi, and include it only in api.gyp, thus fixing
    the problem where json_schema_compiler_tests.gyp was asking it to create
    outputs in the tools/json_schema_compiler_test directory, again causing
    needless work during the build process.

BUG=none (essential plumbing work)
TEST=same as before.

Review URL: https://chromiumcodereview.appspot.com/9716003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127555 0039d316-1c4b-4281-b951-d872f2087c98
2012-03-19 22:24:35 +00:00