Граф коммитов

25 Коммитов

Автор SHA1 Сообщение Дата
James Robinson d71695ea8f Move json schema compiler target into build/ to match gyp
ui/ and chrome/ should not depend on anything from //extensions.

R=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#297528}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 145636c494aa8b2ea39eb86f1b9c13f9ee52f3f7
2014-09-30 22:27:41 +00:00
lfg 7e1977b2ea - 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-Original-Commit-Position: refs/heads/master@{#292567}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a1bee36d9f609ab9a98ecf89bf1dfc0bb4762dc
2014-08-29 03:58:01 +00:00
yoz 61ae794a47 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-Original-Commit-Position: refs/heads/master@{#292090}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 774dcda2d369584b2e964fa4971dda71cf819677
2014-08-27 03:33:52 +00:00
Albert J. Wong 0c4f9846c2 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 3b70ef14be986a3252428cc6d9553bf2c69deb70.

BUG=none
TBR=yoz

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

Cr-Original-Commit-Position: refs/heads/master@{#292059}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8f65982274893958898690b22e1c0c9ed4968857
2014-08-27 01:14:22 +00:00
yoz 06e1e423c2 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-Original-Commit-Position: refs/heads/master@{#292057}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3b70ef14be986a3252428cc6d9553bf2c69deb70
2014-08-27 00:52:34 +00:00
kalman@chromium.org 10936bb33d 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: http://src.chromium.org/svn/trunk/src/build@287488 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-05 08:02:06 +00:00
brettw@chromium.org b45a2ea9a4 Add lots of GN targets:
components/autofill
  components/metrics
  components/policy
  components/variations
  third_party/libphonenumber
  third_party/mt19937ar
  ui/gfx/ipc

These are all requried to compile chrome/browser in some form or another.

Fills out all grit_defines (also required for chrome/browser) and adds associated flags for them.

Add the ability for generated_extensions_api to not generate a bundle.

Remove mt19937ar from .gitignore (it's just checked into the tree)

R=ajwong@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@281057 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-02 17:37:34 +00:00
brettw@chromium.org 1c7fca9198 Make chrome/common compile in GN
Adds extensions common API target and extensions templates.

Adds a number of new targets: widevine, flash, sync proto, metrics proto, device serial.

Minor enhancements to protobuf and mojo templates.

TBR=jamesr

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@278828 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-20 21:40:01 +00:00
rkc@chromium.org c69f9cca50 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: http://src.chromium.org/svn/trunk/src/build@269820 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-12 18:17:44 +00:00
rockot@chromium.org ff3f243596 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: http://src.chromium.org/svn/trunk/src/build@254995 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-05 10:11:19 +00:00
sashab@chromium.org 61ebe5c536 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: http://src.chromium.org/svn/trunk/src/build@180845 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-06 01:29:31 +00:00
kalman@chromium.org c31c5ce419 Overhaul JSON Schema Compiler to support a number of features required to
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: http://src.chromium.org/svn/trunk/src/build@177361 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-17 06:50:31 +00:00
kalman@chromium.org 9e7bf40759 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: http://src.chromium.org/svn/trunk/src/build@176236 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-11 02:10:11 +00:00
ricow@chromium.org df54c3a32a 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: http://src.chromium.org/svn/trunk/src/build@176054 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 12:19:33 +00:00
ricow@chromium.org 3a7822b8a4 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: http://src.chromium.org/svn/trunk/src/build@176051 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 11:14:37 +00:00
ricow@chromium.org c1d02285aa 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: http://src.chromium.org/svn/trunk/src/build@176047 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 10:36:38 +00:00
kalman@chromium.org cdff61818b 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: http://src.chromium.org/svn/trunk/src/build@176015 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 04:05:55 +00:00
miket@chromium.org 24c7372066 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: http://src.chromium.org/svn/trunk/src/build@127555 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-03-19 22:24:35 +00:00
miket@chromium.org 7016680c7a Revert 127159 - 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.

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

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

TBR=miket@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9701105

git-svn-id: http://src.chromium.org/svn/trunk/src/build@127188 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-03-16 17:08:32 +00:00
miket@chromium.org a65c7160d4 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.

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

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@127159 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-03-16 14:33:28 +00:00
miket@chromium.org d9f8ea6eae - Extend compiler.py to recognize .idl files.
- Extend .gyp to pass certain .idl files to compiler.py.
  - Implement a translator taking IDL parser output and creating
    a schema that the JSON compiler recognizes.
  - Convert one API to IDL using asargent's JSON cat JSON-to-IDL
    converter, and adapt API's implementation to use the newly generated
    output.
    
TEST=no changes
BUG=none

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@125300 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-03-07 02:33:35 +00:00
calamity@chromium.org 1809052b2b json_schema_compiler: any, additionalProperties, functions on types
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: http://src.chromium.org/svn/trunk/src/build@124643 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-03-02 15:05:27 +00:00
calamity@chromium.org 69690e98d6 json_schema_compiler: Added wider support for OBJECTs and ENUMs. Used the new 'dependencies' property in the jsons. Refactored to avoid code duplication. Added tests for new features and where tests were lacking.
BUG=
TEST=unit_tests --gtest_filter=JsonSchemaCompiler*


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@123909 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-02-28 05:51:44 +00:00
calamity@chromium.org ada25d12fc Adds support for the "choices" and "any" types to json_schema_compiler, as well
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: http://src.chromium.org/svn/trunk/src/build@122082 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-02-15 14:52:32 +00:00
calamity@chromium.org 65dcba92d1 Code generation for extensions api
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: http://src.chromium.org/svn/trunk/src/build@119405 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-01-27 07:29:48 +00:00