diff options
author | dpranke <dpranke@chromium.org> | 2016-03-09 20:00:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-10 04:01:52 +0000 |
commit | 9fcf4efe81ba396b4afe653c92424ce3fc55ee42 (patch) | |
tree | 2bc71d7c6d8a850f5b4aa91daa1ba8ebf04dff7e /mojo | |
parent | 51a9d209df61e664f99d1a9c4e53d8bb66741021 (diff) | |
download | chromium_src-9fcf4efe81ba396b4afe653c92424ce3fc55ee42.zip chromium_src-9fcf4efe81ba396b4afe653c92424ce3fc55ee42.tar.gz chromium_src-9fcf4efe81ba396b4afe653c92424ce3fc55ee42.tar.bz2 |
Revert of Mojo C++ bindings: replace '::' with '.' in the interface name. (patchset #3 id:40001 of https://codereview.chromium.org/1778793004/ )
Reason for revert:
I think this broke the harness-tests/mojo-helpers.html layout test:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#showExpectations=true&tests=harness-tests%2Fmojo-helpers.html
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux/builds/61800
Original issue's description:
> Mojo C++ bindings: replace '::' with '.' in the interface name.
>
> Previously the |foo::Bar::Name_| field was "foo::Bar". With this change it
> becomes "foo.Bar".
>
> Using C++-style namespace in the name doesn't makes too much sense because the
> name should remain the same across different languages.
>
> BUG=None
>
> Committed: https://crrev.com/026e10b3842af957773aee40dc3736eecb7faa0c
> Cr-Commit-Position: refs/heads/master@{#380301}
TBR=ben@chromium.org,yzshen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None
Review URL: https://codereview.chromium.org/1771353009
Cr-Commit-Position: refs/heads/master@{#380328}
Diffstat (limited to 'mojo')
5 files changed, 9 insertions, 8 deletions
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl index 1512454..de7469c 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl @@ -3,6 +3,7 @@ {%- set class_name = interface.name %} {%- set proxy_name = interface.name ~ "Proxy" %} +{%- set namespace_as_string = "%s"|format(namespace|replace(".","::")) %} {%- macro alloc_params(struct, serialization_context) %} bool success = true; @@ -34,7 +35,7 @@ p_{{param.name}} {%- endmacro %} {#--- Begin #} -MOJO_STATIC_CONST_MEMBER_DEFINITION const char {{class_name}}::Name_[] = "{{namespace}}.{{class_name}}"; +MOJO_STATIC_CONST_MEMBER_DEFINITION const char {{class_name}}::Name_[] = "{{namespace_as_string}}::{{class_name}}"; MOJO_STATIC_CONST_MEMBER_DEFINITION const uint32_t {{class_name}}::Version_; {#--- Constants #} diff --git a/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl index 6f80b04..527e15f 100644 --- a/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl +++ b/mojo/public/tools/bindings/generators/java_templates/interface_definition.tmpl @@ -59,7 +59,7 @@ public static final {{manager_class(interface, True)}} MANAGER = new {{manager_class(interface, True)}}() { public String getName() { - return "{{namespace}}.{{interface.name}}"; + return "{{namespace|replace(".","::")}}::{{interface.name}}"; } public int getVersion() { diff --git a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl index 0f442b8..1b5cafa 100644 --- a/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl +++ b/mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl @@ -161,7 +161,7 @@ params.{{parameter.name}}{% if not loop.last %}, {% endif -%} } var {{interface.name}} = { - name: '{{namespace}}.{{interface.name}}', + name: '{{namespace|replace(".","::")}}::{{interface.name}}', proxyClass: {{interface.name}}Proxy, stubClass: {{interface.name}}Stub, validateRequest: validate{{interface.name}}Request, diff --git a/mojo/shell/tests/connect/connect_unittests_manifest.json b/mojo/shell/tests/connect/connect_unittests_manifest.json index a36e640..cb8e865 100644 --- a/mojo/shell/tests/connect/connect_unittests_manifest.json +++ b/mojo/shell/tests/connect/connect_unittests_manifest.json @@ -3,9 +3,9 @@ "display_name": "Connect Unittests", "capabilities": { "mojo:connect_test_package": ["*"], - "mojo:connect_test_app": ["mojo.shell.test.mojom.ConnectTestService", - "mojo.shell.test.mojom.StandaloneApp"], - "mojo:connect_test_a": ["mojo.shell.test.mojom.ConnectTestService", - "mojo.shell.test.mojom.StandaloneApp"] + "mojo:connect_test_app": ["mojo::shell::test::mojom::ConnectTestService", + "mojo::shell::test::mojom::StandaloneApp"], + "mojo:connect_test_a": ["mojo::shell::test::mojom::ConnectTestService", + "mojo::shell::test::mojom::StandaloneApp"] } } diff --git a/mojo/shell/tests/shell/target_manifest.json b/mojo/shell/tests/shell/target_manifest.json index f751592..68ddc21 100644 --- a/mojo/shell/tests/shell/target_manifest.json +++ b/mojo/shell/tests/shell/target_manifest.json @@ -1,5 +1,5 @@ { "name": "exe:shell_unittest_target", "display_name": "Shell Unittest: Target", - "capabilities": { "mojo:shell_unittest": [ "mojo.shell.test.mojom.CreateInstanceTest" ] } + "capabilities": { "mojo:shell_unittest": [ "mojo::shell::test::mojom::CreateInstanceTest" ] } } |