summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-16 12:35:46 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-16 12:35:46 +0000
commit8351d697de7c2f1f96a568ded049376538689516 (patch)
treef612d2ef4c68732276d42c4a98a50e10e218b850 /tools/json_schema_compiler
parentc1fa6fab56f3009b6672b87cb051edd4136d95d2 (diff)
downloadchromium_src-8351d697de7c2f1f96a568ded049376538689516.zip
chromium_src-8351d697de7c2f1f96a568ded049376538689516.tar.gz
chromium_src-8351d697de7c2f1f96a568ded049376538689516.tar.bz2
Move declarative API into events API
The motivation of this CL is to bring the declarative API and the rest of the events mechanism closer together in the API documentation. To achive this, we move the content of declarative.json and everything related to events from extension.json into the events.json API definition. The new "events" namespace is automatically provided to all extensions. This is a second attempt after http://src.chromium.org/viewvc/chrome?view=rev&revision=137388 failed in ExecuteScriptApiTest.ExecuteScriptInFrame. TBR'ing as this is a tiny change from the previous CL. BUG=126497,112155 TEST=no TBR=aa@chromium.org, kalman@chromium.org Review URL: https://chromiumcodereview.appspot.com/10392127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/json_schema_compiler')
-rw-r--r--tools/json_schema_compiler/cc_generator.py6
-rw-r--r--tools/json_schema_compiler/h_generator.py6
2 files changed, 0 insertions, 12 deletions
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index dbe797a..d5d7021 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -100,12 +100,6 @@ class CCGenerator(object):
c = Code()
if type_.functions:
- # Types with functions are not instantiable in C++ because they are
- # handled in pure Javascript and hence have no properties or
- # additionalProperties.
- if type_.properties:
- raise NotImplementedError('\n'.join(model.GetModelHierarchy(type_)) +
- '\nCannot generate both functions and properties on a type')
for function in type_.functions.values():
(c.Concat(
self._GenerateFunction(
diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py
index a028813..72877f1 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -161,12 +161,6 @@ class HGenerator(object):
c = Code()
if type_.functions:
- # Types with functions are not instantiable in C++ because they are
- # handled in pure Javascript and hence have no properties or
- # additionalProperties.
- if type_.properties:
- raise NotImplementedError('\n'.join(model.GetModelHierarchy(type_)) +
- '\nCannot generate both functions and properties on a type')
c.Sblock('namespace %(classname)s {')
for function in type_.functions.values():
(c.Concat(self._GenerateFunction(function))