OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 interfaces_bindings_gen_dir = "$root_gen_dir/mojo/public/interfaces/bindings" | 5 interfaces_bindings_gen_dir = "$root_gen_dir/mojo/public/interfaces/bindings" |
6 | 6 |
7 source_set("js") { | 7 source_set("js") { |
8 sources = [ | 8 sources = [ |
9 "constants.cc", | 9 "constants.cc", |
10 "constants.h", | 10 "constants.h", |
(...skipping 12 matching lines...) Expand all Loading... |
23 "lib/control_message_handler.js", | 23 "lib/control_message_handler.js", |
24 "lib/control_message_proxy.js", | 24 "lib/control_message_proxy.js", |
25 "router.js", | 25 "router.js", |
26 "support.js", | 26 "support.js", |
27 "threading.js", | 27 "threading.js", |
28 "unicode.js", | 28 "unicode.js", |
29 "validator.js", | 29 "validator.js", |
30 ] | 30 ] |
31 | 31 |
32 deps = [ | 32 deps = [ |
| 33 ":new_bindings", |
33 "//mojo/public/interfaces/bindings:bindings__generator", | 34 "//mojo/public/interfaces/bindings:bindings__generator", |
34 ] | 35 ] |
35 } | 36 } |
36 | 37 |
| 38 action("new_bindings") { |
| 39 new_bindings_js_files = [ |
| 40 # This must be the first file in the list, because it initializes global |
| 41 # variable |mojoBindings| that the others need to refer to. |
| 42 "new_bindings/base.js", |
| 43 |
| 44 "$interfaces_bindings_gen_dir/new_bindings/interface_control_messages.mojom.
js", |
| 45 "new_bindings/bindings.js", |
| 46 "new_bindings/buffer.js", |
| 47 "new_bindings/codec.js", |
| 48 "new_bindings/connector.js", |
| 49 "new_bindings/interface_types.js", |
| 50 "new_bindings/lib/control_message_handler.js", |
| 51 "new_bindings/lib/control_message_proxy.js", |
| 52 "new_bindings/router.js", |
| 53 "new_bindings/unicode.js", |
| 54 "new_bindings/validator.js", |
| 55 ] |
| 56 compiled_file = "$target_gen_dir/mojo_bindings.js" |
| 57 |
| 58 # TODO(yzshen): Eventually we would like to use Closure Compiler to minify the |
| 59 # bindings instead of simply concatenating the files. |
| 60 script = "//v8/tools/concatenate-files.py" |
| 61 |
| 62 sources = new_bindings_js_files |
| 63 outputs = [ |
| 64 compiled_file, |
| 65 ] |
| 66 |
| 67 args = rebase_path(new_bindings_js_files) |
| 68 args += [ rebase_path(compiled_file) ] |
| 69 |
| 70 deps = [ |
| 71 "//mojo/public/interfaces/bindings:new_bindings__generator", |
| 72 ] |
| 73 } |
| 74 |
37 group("tests") { | 75 group("tests") { |
38 testonly = true | 76 testonly = true |
39 | 77 |
40 data = [ | 78 data = [ |
41 "//mojo/public/interfaces/bindings/tests/data/validation/", | 79 "//mojo/public/interfaces/bindings/tests/data/validation/", |
42 "tests/codec_unittest.js", | 80 "tests/codec_unittest.js", |
43 "tests/connection_unittest.js", | 81 "tests/connection_unittest.js", |
44 "tests/core_unittest.js", | 82 "tests/core_unittest.js", |
45 "tests/interface_ptr_unittest.js", | 83 "tests/interface_ptr_unittest.js", |
46 "tests/sample_service_unittest.js", | 84 "tests/sample_service_unittest.js", |
47 "tests/struct_unittest.js", | 85 "tests/struct_unittest.js", |
48 "tests/union_unittest.js", | 86 "tests/union_unittest.js", |
49 "tests/validation_test_input_parser.js", | 87 "tests/validation_test_input_parser.js", |
50 "tests/validation_unittest.js", | 88 "tests/validation_unittest.js", |
51 ] | 89 ] |
52 | 90 |
53 public_deps = [ | 91 public_deps = [ |
54 ":bindings", | 92 ":bindings", |
55 ] | 93 ] |
56 } | 94 } |
OLD | NEW |