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. 4 5 import("//mojo/public/tools/bindings/mojom.gni") 6 import("//build/config/ui.gni") 7 8 executable("mojo_shell") { 9 deps = [ 10 ":lib", 11 "//base", 12 "//mojo/common", 13 "//mojo/environment:chromium", 14 "//ui/gfx", 15 ] 16 17 if (is_component_build) { 18 deps += ["//ui/gl"] 19 } 20 21 sources = [ 22 "desktop/mojo_main.cc" 23 ] 24 } 25 26 # GYP version: mojo/mojo.gyp:mojo_shell_lib 27 source_set("lib") { 28 deps = [ 29 ":app_child_process_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 ] 43 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 "init.cc", 61 "init.h", 62 "in_process_dynamic_service_runner.cc", 63 "in_process_dynamic_service_runner.h", 64 "mojo_url_resolver.cc", 65 "mojo_url_resolver.h", 66 "out_of_process_dynamic_service_runner.cc", 67 "out_of_process_dynamic_service_runner.h", 68 "switches.cc", 69 "switches.h", 70 "task_runners.cc", 71 "task_runners.h", 72 "test_child_process.cc", 73 "test_child_process.h", 74 "ui_application_loader_android.cc", 75 "ui_application_loader_android.h", 76 ] 77 78 if (is_linux) { 79 deps += ["//dbus"] 80 } else if (is_android) { 81 deps += [ 82 "//mojo/services/native_viewport:lib", 83 "//mojo/services/network:lib", 84 ] 85 sources += [ 86 "network_application_loader.cc", 87 "network_application_loader.h", 88 ] 89 } 90 } 91 92 mojom("app_child_process_bindings") { 93 sources = [ 94 "app_child_process.mojom" 95 ] 96 } 97 98 mojom("external_service_bindings") { 99 sources = [ 100 "external_service.mojom" 101 ] 102 } 103 104 test("mojo_shell_tests") { 105 deps = [ 106 ":lib", 107 "//base", 108 "//base:i18n", 109 "//base/test:test_support", 110 "//testing/gtest", 111 "//net:test_support", 112 "//url", 113 "//mojo/application_manager", 114 "//mojo/services/test_service:bindings", 115 "//mojo/common", 116 "//mojo/environment:chromium", 117 "//mojo/system", 118 ] 119 120 datadeps = [ 121 "//mojo/services/test_service:mojo_test_app", 122 "//mojo/services/test_service:mojo_test_request_tracker_app", 123 ] 124 125 sources = [ 126 "child_process_host_unittest.cc", 127 "dynamic_application_loader_unittest.cc", 128 "in_process_dynamic_service_runner_unittest.cc", 129 "shell_test_base.cc", 130 "shell_test_base.h", 131 "shell_test_base_unittest.cc", 132 "shell_test_main.cc", 133 ] 134 135 if (is_android) { 136 deps += [ 137 # TODO(GYP): 138 #'../testing/android/native_test.gyp:native_test_native_code', 139 ] 140 } 141 } 142 143 # GYP version: mojo/mojo.gyp:mojo_shell_test_support 144 source_set("test_support") { 145 sources = [ 146 "shell_test_helper.cc", 147 "shell_test_helper.h", 148 ] 149 150 deps = [ 151 ":lib", 152 "//base:base_static", 153 "//mojo/system", 154 ] 155 } 156