blob: 5ed57a13288b1c9d2bcc7cf3e3baf9ab6a392ee3 [file] [log] [blame]
# Copyright 2014 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.
interfaces_bindings_gen_dir = "$root_gen_dir/mojo/public/interfaces/bindings"
source_set("js") {
sources = [
"constants.cc",
"constants.h",
]
}
group("bindings") {
data = [
"$interfaces_bindings_gen_dir/interface_control_messages.mojom.js",
"$interfaces_bindings_gen_dir/pipe_control_messages.mojom.js",
"bindings.js",
"buffer.js",
"codec.js",
"connector.js",
"core.js",
"interface_types.js",
"lib/control_message_handler.js",
"lib/control_message_proxy.js",
"lib/interface_endpoint_client.js",
"lib/interface_endpoint_handle.js",
"lib/pipe_control_message_handler.js",
"lib/pipe_control_message_proxy.js",
"router.js",
"support.js",
"threading.js",
"unicode.js",
"validator.js",
]
deps = [
":new_bindings",
"//mojo/public/interfaces/bindings:bindings__generator",
]
}
action("new_bindings") {
new_bindings_js_files = [
# This must be the first file in the list, because it initializes global
# variable |mojoBindings| that the others need to refer to.
"new_bindings/base.js",
"$interfaces_bindings_gen_dir/new_bindings/interface_control_messages.mojom.js",
"new_bindings/bindings.js",
"new_bindings/buffer.js",
"new_bindings/codec.js",
"new_bindings/connector.js",
"new_bindings/interface_types.js",
"new_bindings/lib/control_message_handler.js",
"new_bindings/lib/control_message_proxy.js",
"new_bindings/router.js",
"new_bindings/unicode.js",
"new_bindings/validator.js",
]
compiled_file = "$target_gen_dir/mojo_bindings.js"
# TODO(yzshen): Eventually we would like to use Closure Compiler to minify the
# bindings instead of simply concatenating the files.
script = "//v8/tools/concatenate-files.py"
sources = new_bindings_js_files
outputs = [
compiled_file,
]
args = rebase_path(new_bindings_js_files)
args += [ rebase_path(compiled_file) ]
deps = [
"//mojo/public/interfaces/bindings:new_bindings__generator",
]
}
group("tests") {
testonly = true
data = [
"//mojo/public/interfaces/bindings/tests/data/validation/",
"tests/core_unittest.js",
"tests/validation_test_input_parser.js",
"tests/validation_unittest.js",
]
public_deps = [
":bindings",
]
}