Files.app: Stop to use file system URLs having externalfile:// scheme origin internally.
[chromium-blink-merge.git] / mojo / shell / BUILD.gn
blob04fb65a80deefb6f9351712f7e9cb9b40de7ba3d
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/tools/bindings/mojom.gni")
6 import("//build/config/ui.gni")
8 executable("mojo_shell") {
9   deps = [
10     ":lib",
11     "//base",
12     "//mojo/common",
13     "//mojo/environment:chromium",
14   ]
16   if (is_component_build) {
17     deps += ["//ui/gl"]
18   }
20   sources = [
21     "desktop/mojo_main.cc"
22   ]
25 # GYP version: mojo/mojo.gyp:mojo_shell_lib
26 source_set("lib") {
27   deps = [
28     ":app_child_process_bindings",
29     ":external_application_registrar_bindings",
30     ":external_service_bindings",
31     "//base",
32     "//base/third_party/dynamic_annotations",
33     "//base:base_static",
34     "//mojo/application",
35     "//mojo/application_manager",
36     "//mojo/common",
37     "//mojo/gles2",
38     "//mojo/public/interfaces/application",
39     "//mojo/services/public/interfaces/network",
40     "//mojo/spy",
41     "//mojo/system",
42   ]
44   sources = [
45     "app_child_process.cc",
46     "app_child_process.h",
47     "app_child_process_host.cc",
48     "app_child_process_host.h",
49     "child_process.cc",
50     "child_process.h",
51     "child_process_host.cc",
52     "child_process_host.h",
53     "context.cc",
54     "context.h",
55     "dbus_application_loader_linux.cc",
56     "dbus_application_loader_linux.h",
57     "dynamic_application_loader.cc",
58     "dynamic_application_loader.h",
59     "dynamic_service_runner.h",
60     "external_application_listener_posix.cc",
61     "external_application_listener_win.cc",
62     "external_application_listener.h",
63     "incoming_connection_listener_posix.cc",
64     "incoming_connection_listener_posix.h",
65     "init.cc",
66     "init.h",
67     "in_process_dynamic_service_runner.cc",
68     "in_process_dynamic_service_runner.h",
69     "mojo_url_resolver.cc",
70     "mojo_url_resolver.h",
71     "out_of_process_dynamic_service_runner.cc",
72     "out_of_process_dynamic_service_runner.h",
73     "switches.cc",
74     "switches.h",
75     "task_runners.cc",
76     "task_runners.h",
77     "test_child_process.cc",
78     "test_child_process.h",
79     "ui_application_loader_android.cc",
80     "ui_application_loader_android.h",
81   ]
83   if (is_linux) {
84     deps += ["//dbus"]
85   } else if (is_android) {
86     deps += [
87       "//mojo/services/native_viewport:lib",
88       "//mojo/services/network:lib",
89     ]
90     sources += [
91       "network_application_loader.cc",
92       "network_application_loader.h",
93     ]
94   }
97 mojom("app_child_process_bindings") {
98   sources = [
99     "app_child_process.mojom"
100   ]
103 mojom("external_service_bindings") {
104   sources = [
105     "external_service.mojom"
106   ]
109 mojom("external_application_registrar_bindings") {
110   sources = [
111     "external_application_registrar.mojom"
112   ]
115 source_set("external_application_registrar_connection") {
116   sources = [
117     "external_application_registrar_connection.cc",
118     "external_application_registrar_connection.h",
119   ]
121   deps = [
122    ":external_application_registrar_bindings",
123    "//net"
124   ]
127 # GYP version: mojo/mojo.gyp:mojo_shell_tests
128 test("mojo_shell_tests") {
129   deps = [
130     ":lib",
131     "//base",
132     "//base:i18n",
133     "//base/test:test_support",
134     "//testing/gtest",
135     "//net:test_support",
136     "//url",
137     "//mojo/application_manager",
138     "//mojo/services/test_service:bindings",
139     "//mojo/common",
140     "//mojo/environment:chromium",
141     "//mojo/system",
142   ]
144   datadeps = [
145     "//mojo/services/test_service:mojo_test_app",
146     "//mojo/services/test_service:mojo_test_request_tracker_app",
147   ]
149   sources = [
150     "child_process_host_unittest.cc",
151     "dynamic_application_loader_unittest.cc",
152     "in_process_dynamic_service_runner_unittest.cc",
153     "shell_test_base.cc",
154     "shell_test_base.h",
155     "shell_test_base_unittest.cc",
156     "shell_test_main.cc",
157   ]
159   if (is_android) {
160     deps += [
161       # TODO(GYP):
162       #'../testing/android/native_test.gyp:native_test_native_code',
163     ]
164   }
167 # GYP version: mojo/mojo.gyp:mojo_shell_test_support
168 source_set("test_support") {
169   sources = [
170     "shell_test_helper.cc",
171     "shell_test_helper.h",
172   ]
174   deps = [
175     ":lib",
176     "//mojo/system",
177   ]
180 # GYP version: mojo/mojo.gyp:external_application_tests
181 test("mojo_external_application_tests") {
182   deps = [
183     ":lib",
184     ":external_application_registrar_connection",
185     "//base",
186     "//base/test:test_support",
187     "//testing/gtest",
188     "//net:test_support",
189     "//url",
190     "//mojo/application_manager",
191     "//mojo/common",
192     "//mojo/environment:chromium",
193     "//mojo/system",
194   ]
196   sources = [
197     "incoming_connection_listener_unittest.cc",
198     "external_application_listener_unittest.cc",
199     "external_application_test_main.cc",
200   ]