summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-11 20:54:14 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-11 20:54:14 +0000
commit45c0b6c305703132e804f5b9ee5452efcb2a936c (patch)
tree01cc163ad097a2548fc7e6e50e7297fe9d6efdae /mojo
parent5d6a767e7ce47baf81dc172f2ed28eecf96884ce (diff)
downloadchromium_src-45c0b6c305703132e804f5b9ee5452efcb2a936c.zip
chromium_src-45c0b6c305703132e804f5b9ee5452efcb2a936c.tar.gz
chromium_src-45c0b6c305703132e804f5b9ee5452efcb2a936c.tar.bz2
Revert 234233 "Add mojo_idl_generator.gypi"
Broke all windows try jobs. Example: http://build.chromium.org/p/tryserver.chromium/builders/win/builds/124746 FAILED: E:\b\depot_tools\python_bin\python.exe gyp-win-tool action-wrapper environment.x86 mojom_test_target_Generate_C___source_files_from_mojom_files_ff8ddd79354be39f4d49ff68f7050968.f7de501d36c9a2def832b8cb44ee34af.rsp Traceback (most recent call last): File "../mojo/public/bindings/mojom_bindings_generator.py", line 12, in <module> from parser import mojo_parser ImportError: cannot import name mojo_parser ninja: build stopped: subcommand failed. > Add mojo_idl_generator.gypi > NOT FOR REVIEW > BUG= > R=darin@chromium.org > > Review URL: https://codereview.chromium.org/53173008 TBR=davemoore@chromium.org Review URL: https://codereview.chromium.org/69243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234277 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r--mojo/DEPS1
-rw-r--r--mojo/mojo.gyp23
-rwxr-xr-xmojo/public/bindings/mojo_idl.py (renamed from mojo/public/bindings/mojom_bindings_generator.py)3
-rw-r--r--mojo/public/bindings/mojom_bindings_generator.gypi46
-rw-r--r--mojo/public/bindings/sample/generated/sample_service.cc (renamed from mojo/public/bindings/sample/mojom/sample_service.cc)4
-rw-r--r--mojo/public/bindings/sample/generated/sample_service.h (renamed from mojo/public/bindings/sample/mojom/sample_service.h)0
-rw-r--r--mojo/public/bindings/sample/generated/sample_service_internal.h (renamed from mojo/public/bindings/sample/mojom/sample_service_internal.h)2
-rw-r--r--mojo/public/bindings/sample/sample_service.idl33
-rw-r--r--mojo/public/bindings/sample/sample_service.mojom62
-rw-r--r--mojo/public/bindings/sample/sample_test.cc2
10 files changed, 71 insertions, 105 deletions
diff --git a/mojo/DEPS b/mojo/DEPS
index 1bdd152..411bead 100644
--- a/mojo/DEPS
+++ b/mojo/DEPS
@@ -2,6 +2,5 @@ include_rules = [
"+base",
"+build",
"+mojo",
- "+mojom",
"+testing",
]
diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp
index 7f07480..969669f 100644
--- a/mojo/mojo.gyp
+++ b/mojo/mojo.gyp
@@ -24,7 +24,6 @@
'mojo_js',
'sample_app',
'mojo_bindings',
- 'mojom_test',
'mojo_bindings_test',
'native_viewport',
],
@@ -324,33 +323,19 @@
],
},
{
- 'target_name': 'mojom_test',
- 'type': 'executable',
- 'sources': [
- 'public/bindings/sample/sample_test.cc',
- 'public/bindings/sample/sample_service.mojom',
- ],
- 'includes': [ 'public/bindings/mojom_bindings_generator.gypi' ],
- 'dependencies': [
- 'mojo_bindings',
- 'mojo_system',
- ],
- },
- {
'target_name': 'mojo_bindings_test',
'type': 'executable',
'include_dirs': [
- '..',
- '<(DEPTH)/mojo/public/bindings/sample',
+ '..'
],
'dependencies': [
'mojo_bindings',
'mojo_system',
],
'sources': [
- 'public/bindings/sample/mojom/sample_service.cc',
- 'public/bindings/sample/mojom/sample_service.h',
- 'public/bindings/sample/mojom/sample_service_internal.h',
+ 'public/bindings/sample/generated/sample_service.cc',
+ 'public/bindings/sample/generated/sample_service.h',
+ 'public/bindings/sample/generated/sample_service_internal.h',
'public/bindings/sample/sample_test.cc',
],
},
diff --git a/mojo/public/bindings/mojom_bindings_generator.py b/mojo/public/bindings/mojo_idl.py
index 4039972..567adf7 100755
--- a/mojo/public/bindings/mojom_bindings_generator.py
+++ b/mojo/public/bindings/mojo_idl.py
@@ -27,9 +27,6 @@ def Main():
parser.print_help()
sys.exit(1)
- if not os.path.exists(options.output_dir):
- os.makedirs(options.output_dir)
-
for filename in args:
name = os.path.splitext(os.path.basename(filename))[0]
# TODO(darin): There's clearly too many layers of translation here! We can
diff --git a/mojo/public/bindings/mojom_bindings_generator.gypi b/mojo/public/bindings/mojom_bindings_generator.gypi
deleted file mode 100644
index 47abf00..0000000
--- a/mojo/public/bindings/mojom_bindings_generator.gypi
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/mojom',
- },
- 'rules': [
- {
- 'rule_name': 'Generate C++ source files from mojom files',
- 'extension': 'mojom',
- 'variables': {
- 'mojom_bindings_generator':
- '<(DEPTH)/mojo/public/bindings/mojom_bindings_generator.py',
- },
- 'inputs': [
- '<(mojom_bindings_generator)',
- '<(DEPTH)/mojo/public/bindings/parser/mojo_parser.py',
- '<(DEPTH)/mojo/public/bindings/parser/mojo_translate.py',
- '<(DEPTH)/mojo/public/bindings/generators/mojom.py',
- '<(DEPTH)/mojo/public/bindings/generators/mojom_data.py',
- '<(DEPTH)/mojo/public/bindings/generators/mojom_pack.py',
- '<(DEPTH)/mojo/public/bindings/generators/mojom_cpp_generator.py',
- ],
- 'outputs': [
- '<(output_dir)/<(RULE_INPUT_ROOT).h',
- '<(output_dir)/<(RULE_INPUT_ROOT)_internal.h',
- '<(output_dir)/<(RULE_INPUT_ROOT).cc',
- ],
- 'action': [
- 'python', '<@(mojom_bindings_generator)',
- '<(RULE_INPUT_PATH)',
- '-i', 'mojom',
- '-o', '<(output_dir)',
- ],
- 'message': 'Generating C++ from mojom <(RULE_INPUT_PATH)',
- 'process_outputs_as_sources': 1,
- }
- ],
- 'include_dirs': [
- '<(DEPTH)',
- '<(SHARED_INTERMEDIATE_DIR)',
- ],
- 'hard_dependency': 1,
-}
diff --git a/mojo/public/bindings/sample/mojom/sample_service.cc b/mojo/public/bindings/sample/generated/sample_service.cc
index 877b532..9209cb9 100644
--- a/mojo/public/bindings/sample/mojom/sample_service.cc
+++ b/mojo/public/bindings/sample/generated/sample_service.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojom/sample_service.h"
+#include "mojo/public/bindings/sample/generated/sample_service.h"
#include "mojo/public/bindings/lib/message_builder.h"
-#include "mojom/sample_service_internal.h"
+#include "mojo/public/bindings/sample/generated/sample_service_internal.h"
namespace sample {
namespace {
diff --git a/mojo/public/bindings/sample/mojom/sample_service.h b/mojo/public/bindings/sample/generated/sample_service.h
index 9a77aa0..9a77aa0 100644
--- a/mojo/public/bindings/sample/mojom/sample_service.h
+++ b/mojo/public/bindings/sample/generated/sample_service.h
diff --git a/mojo/public/bindings/sample/mojom/sample_service_internal.h b/mojo/public/bindings/sample/generated/sample_service_internal.h
index 93bb78d..fde2b3d 100644
--- a/mojo/public/bindings/sample/mojom/sample_service_internal.h
+++ b/mojo/public/bindings/sample/generated/sample_service_internal.h
@@ -8,7 +8,7 @@
#include <string.h>
#include "mojo/public/bindings/lib/bindings_serialization.h"
-#include "mojom/sample_service.h"
+#include "mojo/public/bindings/sample/generated/sample_service.h"
namespace mojo {
namespace internal {
diff --git a/mojo/public/bindings/sample/sample_service.idl b/mojo/public/bindings/sample/sample_service.idl
new file mode 100644
index 0000000..3358a58
--- /dev/null
+++ b/mojo/public/bindings/sample/sample_service.idl
@@ -0,0 +1,33 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// HYPOTHETICAL IDL:
+
+module sample {
+
+struct Bar {
+ uint8 alpha @0;
+ uint8 beta @1;
+ uint8 gamma @2;
+};
+
+[RequiredFields=7]
+struct Foo {
+ string name @8;
+ int32 x @0;
+ int32 y @1;
+ bool a @2;
+ bool b @3;
+ bool c @4;
+ Bar bar @5;
+ Bar[] extra_bars @7;
+ uint8[] data @6;
+ handle[] files @9;
+};
+
+interface Service {
+ void Frobinate(Foo foo @0, bool baz @1, handle port @2) @0;
+};
+
+}
diff --git a/mojo/public/bindings/sample/sample_service.mojom b/mojo/public/bindings/sample/sample_service.mojom
index 3358a58..a2903f3 100644
--- a/mojo/public/bindings/sample/sample_service.mojom
+++ b/mojo/public/bindings/sample/sample_service.mojom
@@ -1,33 +1,31 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// HYPOTHETICAL IDL:
-
-module sample {
-
-struct Bar {
- uint8 alpha @0;
- uint8 beta @1;
- uint8 gamma @2;
-};
-
-[RequiredFields=7]
-struct Foo {
- string name @8;
- int32 x @0;
- int32 y @1;
- bool a @2;
- bool b @3;
- bool c @4;
- Bar bar @5;
- Bar[] extra_bars @7;
- uint8[] data @6;
- handle[] files @9;
-};
-
-interface Service {
- void Frobinate(Foo foo @0, bool baz @1, handle port @2) @0;
-};
-
+{
+ 'name': 'sample_service',
+ 'namespace': 'sample',
+ 'structs': [{
+ 'name': 'Bar',
+ 'fields': [
+ {'name': 'alpha', 'kind': 'u8', 'ordinal': 0},
+ {'name': 'beta', 'kind': 'u8', 'ordinal': 1},
+ {'name': 'gamma', 'kind': 'u8', 'ordinal': 2}]}, {
+ 'name': 'Foo',
+ 'fields': [
+ {'name': 'name', 'kind': 's', 'ordinal': 8},
+ {'name': 'x', 'kind': 'i32', 'ordinal': 0},
+ {'name': 'y', 'kind': 'i32', 'ordinal': 1},
+ {'name': 'a', 'kind': 'b', 'ordinal': 2},
+ {'name': 'b', 'kind': 'b', 'ordinal': 3},
+ {'name': 'c', 'kind': 'b', 'ordinal': 4},
+ {'name': 'bar', 'kind': 'x:Bar', 'ordinal': 5},
+ {'name': 'extra_bars', 'kind': 'a:x:Bar', 'ordinal': 7},
+ {'name': 'data', 'kind': 'a:u8', 'ordinal': 6},
+ {'name': 'files', 'kind': 'a:h', 'ordinal': 9}]}],
+ 'interfaces': [{
+ 'name': 'Service',
+ 'methods': [{
+ 'name': 'Frobinate',
+ 'ordinal': 0,
+ 'parameters': [
+ {'name': 'foo', 'kind': 'x:Foo', 'ordinal': 0},
+ {'name': 'baz', 'kind': 'b', 'ordinal': 1},
+ {'name': 'port', 'kind': 'h', 'ordinal': 2}]}]}]
}
diff --git a/mojo/public/bindings/sample/sample_test.cc b/mojo/public/bindings/sample/sample_test.cc
index 1ca95dc..7fb999e 100644
--- a/mojo/public/bindings/sample/sample_test.cc
+++ b/mojo/public/bindings/sample/sample_test.cc
@@ -6,7 +6,7 @@
#include <string>
-#include "mojom/sample_service.h"
+#include "mojo/public/bindings/sample/generated/sample_service.h"
namespace sample {