[Android] Introduce new UMA action for when user copies Image URL from context menu
[chromium-blink-merge.git] / mojo / services / network / BUILD.gn
blob2296d44138b925bd043d6f07a1683f34ec360fb7
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
3 # found in the LICENSE file.
5 import("//mojo/public/mojo_application.gni")
7 if (is_android) {
8   import("//build/config/android/rules.gni")
10   java_library_path = "$target_out_dir/java_library.dex.jar"
12   mojo_android_application("network") {
13     output_name = "network_service"
14     input_so = "$root_out_dir/lib.stripped/libnetwork_service.so"
15     input_dex_jar = java_library_path
16     deps = [
17       ":java_library",
18       ":native_library",
19     ]
20   }
22   shared_library("native_library") {
23     output_name = "network_service"
25     sources = [
26       "android_hooks.cc",
27     ]
29     deps = [
30       ":sources",
31       "//base",
32       "//net",
33     ]
34   }
36   android_standalone_library("java_library") {
37     dex_path = java_library_path
39     deps = [
40       "//net/android:net_java",
41     ]
42   }
43 } else {
44   mojo_native_application("network") {
45     output_name = "network_service"
47     deps = [
48       ":sources",
49     ]
50   }
53 source_set("lib") {
54   sources = [
55     "cookie_store_impl.cc",
56     "cookie_store_impl.h",
57     "http_connection_impl.cc",
58     "http_connection_impl.h",
59     "http_server_impl.cc",
60     "http_server_impl.h",
61     "net_adapters.cc",
62     "net_adapters.h",
63     "net_address_type_converters.cc",
64     "net_address_type_converters.h",
65     "network_context.cc",
66     "network_context.h",
67     "network_service_delegate.cc",
68     "network_service_delegate.h",
69     "network_service_impl.cc",
70     "network_service_impl.h",
71     "tcp_bound_socket_impl.cc",
72     "tcp_bound_socket_impl.h",
73     "tcp_connected_socket_impl.cc",
74     "tcp_connected_socket_impl.h",
75     "tcp_server_socket_impl.cc",
76     "tcp_server_socket_impl.h",
77     "udp_socket_impl.cc",
78     "udp_socket_impl.h",
79     "url_loader_factory_impl.cc",
80     "url_loader_factory_impl.h",
81     "url_loader_impl.cc",
82     "url_loader_impl.h",
83     "web_socket_impl.cc",
84     "web_socket_impl.h",
85   ]
87   deps = [
88     "//base",
89     "//mojo/application/public/cpp",
90     "//mojo/services/network/public/cpp",
91     "//mojo/services/network/public/interfaces",
92     "//net",
93     "//net:http_server",
94     "//url",
95     "//sql/mojo",
96   ]
99 source_set("sources") {
100   visibility = [ ":*" ]
102   sources = [
103     "main.cc",
104   ]
106   deps = [
107     ":lib",
108     "//base",
109     "//mojo/application/public/cpp",
110     "//mojo/services/network/public/cpp",
111     "//mojo/services/network/public/interfaces",
112     "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
113     "//third_party/mojo/src/mojo/public/cpp/bindings:bindings",
114   ]
117 mojo_native_application("apptests") {
118   output_name = "network_service_apptests"
119   testonly = true
121   sources = [
122     "http_server_apptest.cc",
123     "udp_socket_apptest.cc",
124     "url_loader_impl_apptest.cc",
125   ]
127   deps = [
128     ":lib",
129     ":network",
130     "//base",
131     "//mojo/application/public/cpp:test_support",
132     "//mojo/services/network/public/cpp",
133     "//mojo/services/network/public/interfaces",
134     "//net",
135     "//net:test_support",
136     "//testing/gtest",
137     "//third_party/mojo/src/mojo/public/cpp/bindings:callback",
138   ]