# 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("//mojo/public/mojo_application.gni") if (is_android) { import("//build/config/android/rules.gni") java_library_path = "$target_out_dir/java_library.dex.jar" mojo_android_application("network") { output_name = "network_service" input_so = "$root_shlib_dir/${shlib_prefix}network_service$shlib_extension" input_dex_jar = java_library_path deps = [ ":java_library", ":native_library", ] } shared_library("native_library") { output_name = "network_service" sources = [ "android_hooks.cc", ] deps = [ ":sources", "//base", "//build/config/sanitizers:deps", "//net", ] } android_standalone_library("java_library") { dex_path = java_library_path deps = [ "//net/android:net_java", ] } } else { mojo_native_application("network") { output_name = "network_service" deps = [ ":sources", ] } } source_set("lib") { sources = [ "cookie_store_impl.cc", "cookie_store_impl.h", "http_connection_impl.cc", "http_connection_impl.h", "http_server_impl.cc", "http_server_impl.h", "mojo_persistent_cookie_store.cc", "mojo_persistent_cookie_store.h", "net_adapters.cc", "net_adapters.h", "net_address_type_converters.cc", "net_address_type_converters.h", "network_context.cc", "network_context.h", "network_service_delegate.cc", "network_service_delegate.h", "network_service_delegate_observer.h", "network_service_impl.cc", "network_service_impl.h", "tcp_bound_socket_impl.cc", "tcp_bound_socket_impl.h", "tcp_connected_socket_impl.cc", "tcp_connected_socket_impl.h", "tcp_server_socket_impl.cc", "tcp_server_socket_impl.h", "udp_socket_impl.cc", "udp_socket_impl.h", "url_loader_factory_impl.cc", "url_loader_factory_impl.h", "url_loader_impl.cc", "url_loader_impl.h", "web_socket_factory_impl.cc", "web_socket_factory_impl.h", "web_socket_impl.cc", "web_socket_impl.h", ] deps = [ "//base", "//components/filesystem/public/interfaces", "//mojo/common:common_base", "//mojo/common:url_type_converters", "//mojo/message_pump", "//mojo/public/cpp/system:system", "//mojo/services/network/public/cpp", "//mojo/services/network/public/interfaces", "//mojo/services/tracing/public/cpp", "//mojo/shell/public/cpp", "//net", "//net:extras", "//net:http_server", "//sql/mojo", "//url", ] } source_set("sources") { visibility = [ ":*" ] sources = [ "main.cc", ] deps = [ ":lib", "//base", "//mojo/public/c/system:for_shared_library", "//mojo/public/cpp/bindings:bindings", "//mojo/services/network/public/cpp", "//mojo/services/network/public/interfaces", "//mojo/shell/public/cpp", ] } mojo_native_application("apptests") { output_name = "network_service_apptests" testonly = true sources = [ "http_server_apptest.cc", "udp_socket_apptest.cc", "url_loader_impl_apptest.cc", ] deps = [ ":lib", ":network", "//base", "//mojo/common:common_base", "//mojo/message_pump", "//mojo/public/cpp/bindings:callback", "//mojo/services/network/public/cpp", "//mojo/services/network/public/interfaces", "//mojo/shell/public/cpp:sources", "//mojo/shell/public/cpp:test_support", "//net", "//net:test_support", "//testing/gtest", ] }