summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler
diff options
context:
space:
mode:
authorSamusaaron3@gmail.com <Samusaaron3@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-17 10:01:32 +0000
committerSamusaaron3@gmail.com <Samusaaron3@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-17 10:01:32 +0000
commit7fa8243bd8cd518fba37b37bc1ccd927484d8a9c (patch)
treec917aa2f58d3ebffaf6f01acdf36d9495f7b1cc2 /tools/json_schema_compiler
parentf11909dccdd014803d2e4e207363eb05d32c7469 (diff)
downloadchromium_src-7fa8243bd8cd518fba37b37bc1ccd927484d8a9c.zip
chromium_src-7fa8243bd8cd518fba37b37bc1ccd927484d8a9c.tar.gz
chromium_src-7fa8243bd8cd518fba37b37bc1ccd927484d8a9c.tar.bz2
Modify test extensions api to use JSON Schema Compiler
BUG=121174 Review URL: https://chromiumcodereview.appspot.com/12472017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/json_schema_compiler')
-rw-r--r--tools/json_schema_compiler/cc_generator.py5
-rw-r--r--tools/json_schema_compiler/h_generator.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index 0f9842f..6cc8751 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -384,6 +384,11 @@ class _Generator(object):
# TODO(kalman): use function.unix_name not Classname.
function_namespace = cpp_util.Classname(function.name)
+ """Windows has a #define for SendMessage, so to avoid any issues, we need
+ to not use the name.
+ """
+ if function_namespace == 'SendMessage':
+ function_namespace = 'PassMessage'
(c.Append('namespace %s {' % function_namespace)
.Append()
)
diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py
index 6aa35c139..7cf6836 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -316,6 +316,11 @@ class _Generator(object):
c = Code()
# TODO(kalman): Use function.unix_name not Classname here.
function_namespace = cpp_util.Classname(function.name)
+ """Windows has a #define for SendMessage, so to avoid any issues, we need
+ to not use the name.
+ """
+ if function_namespace == 'SendMessage':
+ function_namespace = 'PassMessage'
(c.Append('namespace %s {' % function_namespace)
.Append()
.Cblock(self._GenerateFunctionParams(function))