| Index: services/dart/BUILD.gn
|
| diff --git a/mojo/dart/embedder/BUILD.gn b/services/dart/BUILD.gn
|
| similarity index 61%
|
| copy from mojo/dart/embedder/BUILD.gn
|
| copy to services/dart/BUILD.gn
|
| index 0b670ddc3fe0cd5b06fb598ac982dec4bbd7b7d9..5e17c4d105acea0dcfd00ba14ab5b313860f3e79 100644
|
| --- a/mojo/dart/embedder/BUILD.gn
|
| +++ b/services/dart/BUILD.gn
|
| @@ -2,9 +2,18 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +import("//mojo/public/mojo_application.gni")
|
| +
|
| +group("dart") {
|
| + deps = [
|
| + ":dart_content_handler",
|
| + ]
|
| +}
|
| +
|
| action("generate_snapshot_bin") {
|
| deps = [
|
| "//dart/runtime/bin:gen_snapshot",
|
| + "//mojo/public/interfaces/application",
|
| ]
|
| inputs = [
|
| "snapshot.dart",
|
| @@ -16,6 +25,7 @@ action("generate_snapshot_bin") {
|
| "//mojo/public/dart/src/client.dart",
|
| "//mojo/public/dart/src/codec.dart",
|
| "//mojo/public/dart/src/data_pipe.dart",
|
| + "//mojo/public/dart/src/drain_data.dart",
|
| "//mojo/public/dart/src/event_stream.dart",
|
| "//mojo/public/dart/src/handle.dart",
|
| "//mojo/public/dart/src/handle_watcher.dart",
|
| @@ -26,6 +36,9 @@ action("generate_snapshot_bin") {
|
| "//mojo/public/dart/src/timer_impl.dart",
|
| "//mojo/public/dart/src/timer_queue.dart",
|
| "//mojo/public/dart/src/types.dart",
|
| + "//services/dart/lib/application.dart",
|
| + "//services/dart/lib/src/application.dart",
|
| + "//services/dart/lib/src/service_provider.dart",
|
| ]
|
| output = "$target_gen_dir/snapshot_gen.bin"
|
| outputs = [
|
| @@ -33,6 +46,7 @@ action("generate_snapshot_bin") {
|
| ]
|
|
|
| script = "//dart/runtime/tools/create_snapshot_bin.py"
|
| + application_path = rebase_path("//services/dart/lib/application.dart")
|
| builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart")
|
| bindings_path = rebase_path("//mojo/public/dart/bindings.dart")
|
| core_path = rebase_path("//mojo/public/dart/core.dart")
|
| @@ -42,6 +56,7 @@ action("generate_snapshot_bin") {
|
| "--script", rebase_path("snapshot.dart"),
|
| "--output_bin", rebase_path(output, root_build_dir),
|
| "--target_os", os,
|
| + "--url_mapping=dart:mojo_application,$application_path",
|
| "--url_mapping=dart:mojo_bindings,$bindings_path",
|
| "--url_mapping=dart:mojo_builtin,$builtin_path",
|
| "--url_mapping=dart:mojo_core,$core_path",
|
| @@ -54,7 +69,7 @@ action("generate_snapshot_file") {
|
| ]
|
| inputs = [
|
| "//dart/runtime/tools/create_snapshot_file.py",
|
| - "snapshot.cc.tmpl",
|
| + "//mojo/dart/embedder/snapshot.cc.tmpl",
|
| "$target_gen_dir/snapshot_gen.bin",
|
| ]
|
| output = "$target_gen_dir/snapshot.cc"
|
| @@ -65,41 +80,63 @@ action("generate_snapshot_file") {
|
| script = "//dart/runtime/tools/create_snapshot_file.py"
|
| args = [
|
| "--input_bin", rebase_path("$target_gen_dir/snapshot_gen.bin"),
|
| - "--input_cc", rebase_path("snapshot.cc.tmpl"),
|
| + "--input_cc", rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"),
|
| "--output", rebase_path(output),
|
| ]
|
| }
|
|
|
| source_set("dart_controller") {
|
| sources = [
|
| - "builtin.cc",
|
| - "builtin.h",
|
| - "builtin_natives.cc",
|
| - "dart_controller.cc",
|
| - "dart_controller.h",
|
| - "isolate_data.h",
|
| - "mojo_natives.cc",
|
| - "mojo_natives.h",
|
| "$target_gen_dir/snapshot.cc",
|
| ]
|
|
|
| deps = [
|
| ":generate_snapshot_file",
|
| + "//mojo/dart/embedder:dart_controller_no_snapshot",
|
| + ]
|
| +}
|
| +
|
| +mojo_native_application("dart_content_handler") {
|
| + sources = [
|
| + "content_handler_main.cc",
|
| + "dart_app.cc",
|
| + "dart_app.h",
|
| + ]
|
| +
|
| + deps = [
|
| + ":dart_controller",
|
| "//base",
|
| "//base:i18n",
|
| "//crypto",
|
| "//dart/runtime:libdart",
|
| - "//dart/runtime/bin:libdart_embedder_noio",
|
| - "//mojo/public/c/system",
|
| + "//mojo/application",
|
| + "//mojo/application:application",
|
| + "//mojo/application:content_handler",
|
| + "//mojo/dart/embedder:dart_controller_no_snapshot",
|
| + "//mojo/common",
|
| + "//mojo/environment:chromium",
|
| + "//mojo/icu",
|
| "//mojo/public/cpp/system",
|
| + "//mojo/public/cpp/utility",
|
| + "//mojo/public/interfaces/application",
|
| + "//mojo/services/content_handler/public/interfaces",
|
| + "//mojo/services/network/public/interfaces",
|
| ]
|
| +}
|
|
|
| - defines = []
|
| - if (is_debug) {
|
| - defines += [ "DEBUG" ]
|
| - } else {
|
| - defines += [ "NDEBUG" ]
|
| - }
|
| +mojo_native_application("dart_apptests") {
|
| + testonly = true
|
| +
|
| + sources = [
|
| + "echo_apptest.cc",
|
| + ]
|
|
|
| - include_dirs = [ "//dart/runtime" ]
|
| + deps = [
|
| + "//base",
|
| + "//mojo/application",
|
| + "//mojo/application:test_support",
|
| + "//mojo/public/cpp/bindings",
|
| + "//mojo/public/cpp/system",
|
| + "//services/dart/test:echo_service",
|
| + ]
|
| }
|
|
|