mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
119 lines
3.0 KiB
Plaintext
119 lines
3.0 KiB
Plaintext
|
# 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.
|
||
|
|
||
|
import("//tools/grit/grit_rule.gni")
|
||
|
|
||
|
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",
|
||
|
"associated_bindings.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",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
"//mojo/public/interfaces/bindings:bindings_js__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",
|
||
|
|
||
|
"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/lib/interface_endpoint_client.js",
|
||
|
"new_bindings/lib/interface_endpoint_handle.js",
|
||
|
"new_bindings/lib/pipe_control_message_handler.js",
|
||
|
"new_bindings/lib/pipe_control_message_proxy.js",
|
||
|
"new_bindings/router.js",
|
||
|
"new_bindings/unicode.js",
|
||
|
"new_bindings/validator.js",
|
||
|
|
||
|
# These two needs to refer to codec.js.
|
||
|
"$interfaces_bindings_gen_dir/new_bindings/interface_control_messages.mojom.js",
|
||
|
"$interfaces_bindings_gen_dir/new_bindings/pipe_control_messages.mojom.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, root_build_dir)
|
||
|
args += [ rebase_path(compiled_file, root_build_dir) ]
|
||
|
|
||
|
deps = [
|
||
|
"//mojo/public/interfaces/bindings:new_bindings_js__generator",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
group("tests") {
|
||
|
testonly = true
|
||
|
|
||
|
data = [
|
||
|
"tests/core_unittest.js",
|
||
|
]
|
||
|
|
||
|
public_deps = [
|
||
|
":bindings",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
grit("resources") {
|
||
|
source = "mojo_bindings_resources.grd"
|
||
|
|
||
|
# The .grd contains references to generated files.
|
||
|
source_is_generated = true
|
||
|
|
||
|
outputs = [
|
||
|
"grit/mojo_bindings_resources.h",
|
||
|
"mojo_bindings_resources.pak",
|
||
|
]
|
||
|
grit_flags = [
|
||
|
"-E",
|
||
|
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
|
||
|
]
|
||
|
deps = [
|
||
|
":new_bindings",
|
||
|
]
|
||
|
}
|