[Drive] Handle error cases earlier in FakeDriveService
[chromium-blink-merge.git] / mojo / mojo.gyp
blob69678c5772f6c9286789c87c65fba3438ab8343c
1 # Copyright 2013 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.
6   'target_defaults': {
7     'conditions': [
8       ['mojo_shell_debug_url != ""', {
9         'defines': [
10           'MOJO_SHELL_DEBUG=1',
11           'MOJO_SHELL_DEBUG_URL="<(mojo_shell_debug_url)"',
12          ],
13       }],
14     ],
15   },
16   'includes': [
17     'mojo_apps.gypi',
18     'mojo_examples.gypi',
19     'mojo_services.gypi',
20     'mojo_variables.gypi',
21   ],
22   'targets': [
23     {
24       'target_name': 'mojo',
25       'type': 'none',
26       'dependencies': [
27         'mojo_application_manager',
28         'mojo_application_manager_unittests',
29         'mojo_apps_js_unittests',
30         'mojo_base.gyp:mojo_base',
31         'mojo_compositor_app',
32         'mojo_content_handler_demo',
33         'mojo_echo_client',
34         'mojo_echo_service',
35         'mojo_example_apptests',
36         'mojo_example_service',
37         'mojo_geometry_lib',
38         'mojo_html_viewer',
39         'mojo_js',
40         'mojo_launcher',
41         'mojo_native_viewport_service_lib',
42         'mojo_network_service',
43         'mojo_pepper_container_app',
44         'mojo_png_viewer',
45         'mojo_sample_app',
46         'mojo_shell',
47         'mojo_shell_lib',
48         'mojo_shell_tests',
49         'mojo_surfaces_app',
50         'mojo_surfaces_app',
51         'mojo_surfaces_child_app',
52         'mojo_surfaces_lib',
53         'mojo_surfaces_lib_unittests',
54         'mojo_surfaces_service',
55         'mojo_test_app',
56         'mojo_test_request_tracker_app',
57         'mojo_view_manager_lib',
58         'mojo_view_manager_lib_unittests',
59         'mojo_wget',
60       ],
61       'conditions': [
62         ['use_aura==1', {
63           'dependencies': [
64             'mojo_aura_demo',
65             'mojo_aura_demo_init',
66             'mojo_browser',
67             'mojo_core_window_manager',
68             'mojo_core_window_manager_unittests',
69             'mojo_demo_launcher',
70             'mojo_embedded_app',
71             'mojo_keyboard',
72             'mojo_media_viewer',
73             'mojo_nesting_app',
74             'mojo_window_manager',
75             'mojo_wm_flow_app',
76             'mojo_wm_flow_embedded',
77             'mojo_wm_flow_init',
78             'mojo_wm_flow_wm',
79             'mojo_view_manager',
80             'mojo_view_manager_unittests',
81           ],
82         }],
83         ['OS == "linux"', {
84           'dependencies': [
85             'mojo_dbus_echo',
86             'mojo_dbus_echo_service',
87           ],
88         }],
89       ]
90     },
91     {
92       # GN version: //mojo/shell:external_service_bindings
93       'target_name': 'mojo_external_service_bindings',
94       'type': 'static_library',
95       'sources': [
96         'shell/external_service.mojom',
97       ],
98       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
99       'export_dependent_settings': [
100         'mojo_base.gyp:mojo_cpp_bindings',
101       ],
102       'dependencies': [
103         'mojo_base.gyp:mojo_cpp_bindings',
104       ],
105     },
106     {
107       'target_name': 'mojo_spy',
108       'type': 'static_library',
109       'dependencies': [
110         '../base/base.gyp:base',
111         '../base/base.gyp:base_static',
112         '../net/net.gyp:http_server',
113         '../url/url.gyp:url_lib',
114         'mojo_application_manager',
115       ],
116       'variables': {
117         'mojom_base_output_dir': 'mojo',
118       },
119       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
120       'sources': [
121         'spy/public/spy.mojom',
122         'spy/common.h',
123         'spy/spy.cc',
124         'spy/spy.h',
125         'spy/spy_server_impl.h',
126         'spy/spy_server_impl.cc',
127         'spy/websocket_server.cc',
128         'spy/websocket_server.h',
129       ],
130     },
131     {
132       # GN version: //mojo/shell:lib
133       'target_name': 'mojo_shell_lib',
134       'type': 'static_library',
135       'dependencies': [
136         '../base/base.gyp:base',
137         '../base/base.gyp:base_static',
138         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
139         '../net/net.gyp:net',
140         '../url/url.gyp:url_lib',
141         'mojo_application_manager',
142         'mojo_base.gyp:mojo_application_bindings',
143         'mojo_base.gyp:mojo_common_lib',
144         'mojo_base.gyp:mojo_gles2_impl',
145         'mojo_base.gyp:mojo_system_impl',
146         'mojo_base.gyp:mojo_application_chromium',
147         'mojo_external_service_bindings',
148         'mojo_native_viewport_service_lib',
149         'mojo_network_bindings',
150         'mojo_spy',
151       ],
152       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
153       'sources': [
154         'shell/app_child_process.cc',
155         'shell/app_child_process.h',
156         'shell/app_child_process.mojom',
157         'shell/app_child_process_host.cc',
158         'shell/app_child_process_host.h',
159         'shell/child_process.cc',
160         'shell/child_process.h',
161         'shell/child_process_host.cc',
162         'shell/child_process_host.h',
163         'shell/context.cc',
164         'shell/context.h',
165         'shell/dbus_application_loader_linux.cc',
166         'shell/dbus_application_loader_linux.h',
167         'shell/dynamic_application_loader.cc',
168         'shell/dynamic_application_loader.h',
169         'shell/dynamic_service_runner.h',
170         'shell/init.cc',
171         'shell/init.h',
172         'shell/in_process_dynamic_service_runner.cc',
173         'shell/in_process_dynamic_service_runner.h',
174         'shell/keep_alive.cc',
175         'shell/keep_alive.h',
176         'shell/mojo_url_resolver.cc',
177         'shell/mojo_url_resolver.h',
178         'shell/out_of_process_dynamic_service_runner.cc',
179         'shell/out_of_process_dynamic_service_runner.h',
180         'shell/run.cc',
181         'shell/run.h',
182         'shell/switches.cc',
183         'shell/switches.h',
184         'shell/task_runners.cc',
185         'shell/task_runners.h',
186         'shell/test_child_process.cc',
187         'shell/test_child_process.h',
188         'shell/ui_application_loader_android.cc',
189         'shell/ui_application_loader_android.h',
190         'shell/view_manager_loader.cc',
191         'shell/view_manager_loader.h',
192       ],
193       'conditions': [
194         ['OS=="linux"', {
195           'dependencies': [
196             '../build/linux/system.gyp:dbus',
197             '../dbus/dbus.gyp:dbus',
198           ],
199         }],
200         ['OS=="android"', {
201           'dependencies': [
202             'mojo_network_service_lib',
203           ],
204           'sources': [
205             'shell/network_application_loader.cc',
206             'shell/network_application_loader.h',
207           ],
208         }],
209         ['use_aura==1', {
210           'dependencies': [
211             # These are only necessary as long as we hard code use of ViewManager.
212             '../skia/skia.gyp:skia',
213             'mojo_view_manager',
214             'mojo_view_manager_bindings',
215           ],
216         }, {  # use_aura==0
217           'sources!': [
218             'shell/view_manager_loader.cc',
219             'shell/view_manager_loader.h',
220           ],
221         }],
222       ],
223     },
224     {
225       'target_name': 'mojo_shell_test_support',
226       'type': 'static_library',
227       'dependencies': [
228         '../base/base.gyp:base',
229         '../base/base.gyp:base_static',
230         '../url/url.gyp:url_lib',
231         'mojo_application_manager',
232         'mojo_base.gyp:mojo_system_impl',
233         'mojo_shell_lib',
234       ],
235       'sources': [
236         'shell/shell_test_helper.cc',
237         'shell/shell_test_helper.h',
238       ],
239     },
240     {
241       # GN version: //mojo/shell
242       'target_name': 'mojo_shell',
243       'type': 'executable',
244       'dependencies': [
245         '../base/base.gyp:base',
246         '../ui/gl/gl.gyp:gl',
247         '../url/url.gyp:url_lib',
248         'mojo_application_manager',
249         'mojo_base.gyp:mojo_common_lib',
250         'mojo_base.gyp:mojo_environment_chromium',
251         'mojo_base.gyp:mojo_system_impl',
252         'mojo_shell_lib',
253       ],
254       'conditions': [
255         ['use_ozone==1', {
256           'dependencies': [
257             '../ui/ozone/ozone.gyp:ozone',
258           ],
259         }],
260       ],
261       'sources': [
262         'shell/desktop/mojo_main.cc',
263       ],
264     },
265     {
266       # GN version: //mojo/shell:mojo_shell_tests
267       'target_name': 'mojo_shell_tests',
268       'type': '<(gtest_target_type)',
269       'dependencies': [
270         '../base/base.gyp:base',
271         '../base/base.gyp:base_i18n',
272         '../base/base.gyp:test_support_base',
273         '../testing/gtest.gyp:gtest',
274         '../net/net.gyp:net_test_support',
275         # TODO(vtl): We don't currently need this, but I imagine we will soon.
276         # '../ui/gl/gl.gyp:gl',
277         '../url/url.gyp:url_lib',
278         'mojo_application_manager',
279         'mojo_base.gyp:mojo_common_lib',
280         'mojo_base.gyp:mojo_environment_chromium',
281         'mojo_base.gyp:mojo_system_impl',
282         'mojo_shell_lib',
283         'mojo_test_app',
284         'mojo_test_request_tracker_app',
285         'mojo_test_service_bindings',
286       ],
287       'sources': [
288         'shell/child_process_host_unittest.cc',
289         'shell/dynamic_application_loader_unittest.cc',
290         'shell/in_process_dynamic_service_runner_unittest.cc',
291         'shell/shell_test_base.cc',
292         'shell/shell_test_base.h',
293         'shell/shell_test_base_unittest.cc',
294         'shell/shell_test_main.cc',
295       ],
296       'conditions': [
297         ['OS == "android"', {
298           'dependencies': [
299             '../testing/android/native_test.gyp:native_test_native_code',
300           ],
301         }],
302       ],
303     },
304     {
305       # GN version: //mojo/application_manager
306       'target_name': 'mojo_application_manager',
307       'type': '<(component)',
308       'defines': [
309         'MOJO_APPLICATION_MANAGER_IMPLEMENTATION',
310       ],
311       'dependencies': [
312         '../base/base.gyp:base',
313         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
314         '../net/net.gyp:net',
315         '../url/url.gyp:url_lib',
316         'mojo_content_handler_bindings',
317         'mojo_network_bindings',
318         'mojo_base.gyp:mojo_application_bindings',
319         'mojo_base.gyp:mojo_common_lib',
320         'mojo_base.gyp:mojo_environment_chromium',
321         '<(mojo_system_for_component)',
322       ],
323       'sources': [
324         'application_manager/application_loader.cc',
325         'application_manager/application_loader.h',
326         'application_manager/application_manager.cc',
327         'application_manager/application_manager.h',
328         'application_manager/application_manager_export.h',
329         'application_manager/background_shell_application_loader.cc',
330         'application_manager/background_shell_application_loader.h',
331       ],
332       'export_dependent_settings': [
333         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
334         'mojo_base.gyp:mojo_application_bindings',
335       ],
336     },
337     {
338       'target_name': 'mojo_application_manager_unittests',
339       'type': 'executable',
340       'dependencies': [
341         '../base/base.gyp:base',
342         '../testing/gtest.gyp:gtest',
343         '../url/url.gyp:url_lib',
344         'mojo_application_manager',
345         'mojo_base.gyp:mojo_common_lib',
346         'mojo_base.gyp:mojo_cpp_bindings',
347         'mojo_base.gyp:mojo_environment_chromium',
348         'mojo_base.gyp:mojo_run_all_unittests',
349         'mojo_base.gyp:mojo_application_chromium',
350       ],
351       'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ],
352       'sources': [
353         'application_manager/application_manager_unittest.cc',
354         'application_manager/background_shell_application_loader_unittest.cc',
355         'application_manager/test.mojom',
356       ],
357     },
358     {
359       # GN version: //mojo/cc
360       'target_name': 'mojo_cc_support',
361       'type': 'static_library',
362       'dependencies': [
363         '../base/base.gyp:base',
364         '../cc/cc.gyp:cc',
365         '../skia/skia.gyp:skia',
366         '../gpu/gpu.gyp:gles2_implementation',
367         '<(mojo_gles2_for_loadable_module)',
368       ],
369       'sources': [
370         'cc/context_provider_mojo.cc',
371         'cc/context_provider_mojo.h',
372       ],
373     },
374   ],
375   'conditions': [
376     ['OS=="android"', {
377       'targets': [
378         {
379           'target_name': 'mojo_native_viewport_java',
380           'type': 'none',
381           'dependencies': [
382             '../base/base.gyp:base_java',
383           ],
384           'variables': {
385             'java_in_dir': '<(DEPTH)/mojo/services/native_viewport/android',
386           },
387           'includes': [ '../build/java.gypi' ],
388         },
389         {
390           'target_name': 'libmojo_shell',
391           'type': 'shared_library',
392           'dependencies': [
393             '../base/base.gyp:base',
394             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
395             '../ui/gfx/gfx.gyp:gfx',
396             '../ui/gfx/gfx.gyp:gfx_geometry',
397             '../ui/gl/gl.gyp:gl',
398             'mojo_base.gyp:mojo_application_bindings',
399             'mojo_base.gyp:mojo_common_lib',
400             'mojo_base.gyp:mojo_environment_chromium',
401             'mojo_base.gyp:mojo_jni_headers',
402             'mojo_shell_lib',
403           ],
404           'sources': [
405             'shell/android/library_loader.cc',
406             'shell/android/mojo_main.cc',
407             'shell/android/mojo_main.h',
408           ],
409         },
410         {
411           'target_name': 'mojo_shell_apk',
412           'type': 'none',
413           'dependencies': [
414             '../base/base.gyp:base_java',
415             '../net/net.gyp:net_java',
416             'mojo_native_viewport_java',
417             'libmojo_shell',
418           ],
419           'variables': {
420             'apk_name': 'MojoShell',
421             'java_in_dir': '<(DEPTH)/mojo/shell/android/apk',
422             'resource_dir': '<(DEPTH)/mojo/shell/android/apk/res',
423             'native_lib_target': 'libmojo_shell',
424           },
425           'includes': [ '../build/java_apk.gypi' ],
426         }
427       ],
428     }],
429     ['OS=="linux"', {
430       'targets': [
431         {
432           'target_name': 'mojo_dbus_service',
433           'type': 'static_library',
434           'dependencies': [
435             '../base/base.gyp:base',
436             '../build/linux/system.gyp:dbus',
437             '../dbus/dbus.gyp:dbus',
438             'mojo_base.gyp:mojo_application_chromium',
439             'mojo_base.gyp:mojo_common_lib',
440             'mojo_base.gyp:mojo_system_impl',
441             'mojo_external_service_bindings',
442           ],
443           'sources': [
444             'dbus/dbus_external_service.h',
445             'dbus/dbus_external_service.cc',
446           ],
447         },
448       ],
449     }],
450     ['use_aura==1', {
451       'targets': [
452         {
453           'target_name': 'mojo_aura_support',
454           'type': 'static_library',
455           'dependencies': [
456             '../cc/cc.gyp:cc',
457             '../ui/aura/aura.gyp:aura',
458             '../ui/compositor/compositor.gyp:compositor',
459             '../ui/events/events.gyp:events',
460             '../ui/events/events.gyp:events_base',
461             '../ui/gl/gl.gyp:gl',
462             '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu',
463             'mojo_cc_support',
464             'mojo_native_viewport_bindings',
465             '<(mojo_gles2_for_loadable_module)',
466           ],
467           'sources': [
468             'aura/aura_init.cc',
469             'aura/aura_init.h',
470             'aura/context_factory_mojo.cc',
471             'aura/context_factory_mojo.h',
472             'aura/screen_mojo.cc',
473             'aura/screen_mojo.h',
474             'aura/window_tree_host_mojo.cc',
475             'aura/window_tree_host_mojo.h',
476             'aura/window_tree_host_mojo_delegate.h',
477           ],
478         },
479         {
480           'target_name': 'mojo_views_support',
481           'type': 'static_library',
482           'dependencies': [
483             '../base/base.gyp:base',
484             '../base/base.gyp:base_i18n',
485             '../skia/skia.gyp:skia',
486             '../skia/skia.gyp:skia',
487             '../third_party/icu/icu.gyp:icui18n',
488             '../third_party/icu/icu.gyp:icuuc',
489             '../ui/aura/aura.gyp:aura',
490             '../ui/base/ui_base.gyp:ui_base',
491             '../ui/views/views.gyp:views',
492             '../ui/wm/wm.gyp:wm',
493             'mojo_aura_support',
494             'mojo_views_support_internal',
495           ],
496           'sources': [
497             'views/native_widget_view_manager.cc',
498             'views/native_widget_view_manager.h',
499             'views/views_init.cc',
500             'views/views_init.h',
501           ],
502         },
503         {
504           'target_name': 'mojo_views_support_internal',
505           'type': '<(component)',
506           'dependencies': [
507             '../base/base.gyp:base',
508             '../base/base.gyp:base_i18n',
509             '../base/base.gyp:base_static',
510             '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
511             '../skia/skia.gyp:skia',
512             '../skia/skia.gyp:skia',
513             '../third_party/icu/icu.gyp:icui18n',
514             '../third_party/icu/icu.gyp:icuuc',
515             '../ui/base/ui_base.gyp:ui_base',
516             '../ui/gfx/gfx.gyp:gfx',
517           ],
518           'sources': [
519             'views/mojo_views_export.h',
520             'views/views_init_internal.cc',
521             'views/views_init_internal.h',
522           ],
523           'defines': [
524             'MOJO_VIEWS_IMPLEMENTATION',
525           ],
526         },
527       ],
528     }],
529   ],