diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-29 09:26:20 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-29 09:26:20 +0000 |
commit | 8bb00ee6dc3b62e7dad19b3220253ebb70dc8b30 (patch) | |
tree | e50adb64be76feb6005a35b853377fa12b24fe26 | |
parent | 45f0b3a2052cdfffdd08c86119142ecf789b3cad (diff) | |
download | chromium_src-8bb00ee6dc3b62e7dad19b3220253ebb70dc8b30.zip chromium_src-8bb00ee6dc3b62e7dad19b3220253ebb70dc8b30.tar.gz chromium_src-8bb00ee6dc3b62e7dad19b3220253ebb70dc8b30.tar.bz2 |
GN: Add GN rules for mojo_shell target
This adds GN rules for mojo_shell and all of its dependencies on linux
in the static build.
BUG=397679
Review URL: https://codereview.chromium.org/414323003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286143 0039d316-1c4b-4281-b951-d872f2087c98
34 files changed, 662 insertions, 43 deletions
@@ -48,10 +48,6 @@ group("root") { "//ipc", "//media", "//mojo", - "//mojo/common", - "//mojo/environment:chromium", - "//mojo/service_manager", - "//mojo/system", "//net", "//pdf", "//ppapi:ppapi_c", @@ -180,6 +176,7 @@ group("root") { "//extensions/common", "//extensions/common/api", "//extensions/renderer", + "//mojo", # Blocked on GN toolchain support: https://codereview.chromium.org/428633006/ "//pdf", # Not compiled on Android in GYP yet, either. "//ppapi:ppapi_c", "//sandbox", diff --git a/mojo/BUILD.gn b/mojo/BUILD.gn index 4cb7120..62c6ba8 100644 --- a/mojo/BUILD.gn +++ b/mojo/BUILD.gn @@ -4,7 +4,23 @@ group("mojo") { deps = [ + "//mojo/common", "//mojo/public", "//mojo/services", + "//mojo/shell:mojo_shell", ] } + +if (is_android) { + import("//build/config/android/rules.gni") + + generate_jni("jni_headers") { + sources = [ + "android/javatests/src/org/chromium/mojo/MojoTestCase.java", + "android/system/src/org/chromium/mojo/system/impl/CoreImpl.java", + "services/native_viewport/android/src/org/chromium/mojo/NativeViewportAndroid.java", + ] + + jni_package = "mojo" + } +} diff --git a/mojo/bindings/js/BUILD.gn b/mojo/bindings/js/BUILD.gn index f89e430..9b3550f 100644 --- a/mojo/bindings/js/BUILD.gn +++ b/mojo/bindings/js/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. # GYP version: mojo/mojo.gyp:mojo_js_bindings -static_library("js") { +source_set("js") { sources = [ "core.cc", "core.h", diff --git a/mojo/cc/BUILD.gn b/mojo/cc/BUILD.gn new file mode 100644 index 0000000..415bf44 --- /dev/null +++ b/mojo/cc/BUILD.gn @@ -0,0 +1,18 @@ +# 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. + +source_set("cc") { + deps = [ + "//base", + "//cc", + "//skia", + "//gpu/command_buffer/client:gles2_implementation", + "//mojo/public/gles2", + ] + + sources = [ + "context_provider_mojo.cc", + "context_provider_mojo.h", + ] +} diff --git a/mojo/environment/BUILD.gn b/mojo/environment/BUILD.gn index 20d3828..5c9fe75 100644 --- a/mojo/environment/BUILD.gn +++ b/mojo/environment/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. # GYP version: mojo.gyp:mojo_environment_chromium -static_library("chromium") { +source_set("chromium") { output_name = "mojo_environment_chromium" sources = [ diff --git a/mojo/gles2/BUILD.gn b/mojo/gles2/BUILD.gn new file mode 100644 index 0000000..0893116 --- /dev/null +++ b/mojo/gles2/BUILD.gn @@ -0,0 +1,37 @@ +# 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/tools/bindings/mojom.gni") + +component("gles2") { + output_name = "mojo_gles2_impl" + + deps = [ + "//base", + "//base/third_party/dynamic_annotations", + "//gpu/command_buffer/client", + "//gpu/command_buffer/common", + "//gpu/command_buffer/client:gles2_implementation", + "//mojo/public/gles2", + "//mojo/services/gles2:bindings", + "//mojo/services/gles2:interfaces", + "//mojo/environment:chromium", + ] + + if (is_component_build) { + deps += [ "//mojo/system" ] + } + + defines = [ "MOJO_GLES2_IMPL_IMPLEMENTATION" ] + + sources = [ + "command_buffer_client_impl.cc", + "command_buffer_client_impl.h", + "gles2_impl_export.h", + "gles2_support_impl.cc", + "gles2_support_impl.h", + "gles2_context.cc", + "gles2_context.h", + ] +} diff --git a/mojo/mojo.gyp b/mojo/mojo.gyp index 6ec7c1c..74c4c99 100644 --- a/mojo/mojo.gyp +++ b/mojo/mojo.gyp @@ -149,6 +149,7 @@ 'type': 'none', }, { + # GN version: //mojo/shell:external_service_bindings 'target_name': 'mojo_external_service_bindings', 'type': 'static_library', 'sources': [ @@ -331,6 +332,7 @@ ], }, { + # GN version: //mojo/gles2 'target_name': 'mojo_gles2_impl', 'type': '<(component)', 'dependencies': [ @@ -537,6 +539,7 @@ ], }, { + # GN version: //mojo/shell:lib 'target_name': 'mojo_shell_lib', 'type': 'static_library', 'dependencies': [ @@ -646,6 +649,7 @@ ], }, { + # GN version: //mojo/shell 'target_name': 'mojo_shell', 'type': 'executable', 'dependencies': [ @@ -770,6 +774,7 @@ ], }, { + # GN version: //mojo/cc 'target_name': 'mojo_cc_support', 'type': 'static_library', 'dependencies': [ diff --git a/mojo/mojo_public.gypi b/mojo/mojo_public.gypi index cabd8bb..a728bdc 100644 --- a/mojo/mojo_public.gypi +++ b/mojo/mojo_public.gypi @@ -164,7 +164,7 @@ ], }, { - # GN version: //mojo/public/interfaces/service_provider:service_provider + # GN version: //mojo/public/interfaces/service_provider 'target_name': 'mojo_service_provider_bindings', 'type': 'static_library', 'sources': [ diff --git a/mojo/mojo_services.gypi b/mojo/mojo_services.gypi index b66c1e4..5572beb 100644 --- a/mojo/mojo_services.gypi +++ b/mojo/mojo_services.gypi @@ -66,6 +66,7 @@ ], }, { + # GN version: //mojo/services/public/cpp/input_events 'target_name': 'mojo_input_events_lib', 'type': '<(component)', 'defines': [ @@ -88,7 +89,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/input_events:bindings + # GN version: //mojo/services/public/interfaces/input_events 'target_name': 'mojo_input_events_bindings', 'type': 'static_library', 'sources': [ @@ -104,7 +105,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/geometry:bindings + # GN version: //mojo/services/public/interfaces/geometry 'target_name': 'mojo_geometry_bindings', 'type': 'static_library', 'sources': [ @@ -119,6 +120,7 @@ ], }, { + # GN version: //mojo/services/public/cpp/geometry 'target_name': 'mojo_geometry_lib', 'type': '<(component)', 'defines': [ @@ -193,6 +195,7 @@ ], }, { + # GN version: //mojo/public/gles2 'target_name': 'mojo_gles2', 'type': 'shared_library', 'defines': [ @@ -251,6 +254,7 @@ ], }, { + # GN version: //mojo/services/gles2 'target_name': 'mojo_gles2_service', 'type': 'static_library', 'dependencies': [ @@ -270,7 +274,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/native_viewport:bindings + # GN version: //mojo/services/public/interfaces/native_viewport 'target_name': 'mojo_native_viewport_bindings', 'type': 'static_library', 'sources': [ @@ -288,6 +292,7 @@ ], }, { + # GN version: //mojo/services/native_viewport 'target_name': 'mojo_native_viewport_service', # This is linked directly into the embedder, so we make it a component. 'type': '<(component)', @@ -344,7 +349,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/navigation:bindings + # GN version: //mojo/services/public/interfaces/navigation 'target_name': 'mojo_navigation_bindings', 'type': 'static_library', 'sources': [ @@ -360,7 +365,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/network:bindings + # GN version: //mojo/services/public/interfaces/network 'target_name': 'mojo_network_bindings', 'type': 'static_library', 'sources': [ @@ -378,6 +383,7 @@ ], }, { + # GN version: //mojo/services/network 'target_name': 'mojo_network_service_lib', 'type': 'static_library', 'dependencies': [ @@ -445,6 +451,7 @@ ], }, { + # GN version: //mojo/services/public/cpp/view_manager:common 'target_name': 'mojo_view_manager_common', 'type': 'static_library', 'sources': [ @@ -452,7 +459,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/launcher:bindings + # GN version: //mojo/services/public/interfaces/launcher 'target_name': 'mojo_launcher_bindings', 'type': 'static_library', 'sources': [ @@ -486,7 +493,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/view_manager:bindings + # GN version: //mojo/services/public/interfaces/view_manager 'target_name': 'mojo_view_manager_bindings', 'type': 'static_library', 'sources': [ @@ -504,6 +511,7 @@ ], }, { + # GN version: //mojo/services/public/cpp/view_manager 'target_name': 'mojo_view_manager_lib', 'type': 'static_library', 'dependencies': [ @@ -577,7 +585,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/surfaces:bindings + # GN version: //mojo/services/public/interfaces/surfaces 'target_name': 'mojo_surfaces_bindings', 'type': 'static_library', 'sources': [ @@ -613,6 +621,7 @@ ], }, { + # GN version: //mojo/services/test_service 'target_name': 'mojo_test_app', 'type': 'loadable_module', 'dependencies': [ @@ -636,6 +645,7 @@ ], }, { + # GN version: //mojo/services/test_service:request_tracker 'target_name': 'mojo_test_request_tracker_app', 'type': 'loadable_module', 'dependencies': [ @@ -659,7 +669,7 @@ ], }, { - # GN version: //mojo/services/public/interfaces/window_manager:core_bindings + # GN version: //mojo/services/public/interfaces/window_manager 'target_name': 'mojo_core_window_manager_bindings', 'type': 'static_library', 'sources': [ @@ -678,6 +688,7 @@ ['use_aura==1', { 'targets': [ { + # GN version: //mojo/services/view_manager 'target_name': 'mojo_view_manager', 'type': '<(component)', 'dependencies': [ diff --git a/mojo/public/cpp/application/BUILD.gn b/mojo/public/cpp/application/BUILD.gn index cbad965..2036096 100644 --- a/mojo/public/cpp/application/BUILD.gn +++ b/mojo/public/cpp/application/BUILD.gn @@ -20,3 +20,15 @@ source_set("application") { "//mojo/public/interfaces/service_provider", ] } + +source_set("main_chromium") { + sources = [ + "lib/mojo_main_chromium.cc" + ] +} + +source_set("main_standalone") { + sources = [ + "lib/mojo_main_standalone.cc" + ] +} diff --git a/mojo/public/gles2/BUILD.gn b/mojo/public/gles2/BUILD.gn new file mode 100644 index 0000000..b470636 --- /dev/null +++ b/mojo/public/gles2/BUILD.gn @@ -0,0 +1,34 @@ +# 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. + +config("gles2_config") { + defines = [ "GLES2_USE_MOJO" ] +} + +shared_library("gles2") { + output_name = "mojo_gles2" + + defines = [ + "MOJO_GLES2_IMPLEMENTATION", + ] + + configs += [ + ":gles2_config", + "//third_party/khronos:khronos_headers", + ] + direct_dependent_configs = [ ":gles2_config" ] + + sources = [ + "../c/gles2/gles2.h", + "../c/gles2/gles2_export.h", + "gles2_private.cc", + "gles2_private.h", + ] + + if (is_mac) { + # TODO(GYP): Make it a run-path dependent library. + # 'DYLIB_INSTALL_NAME_BASE': '@loader_path', + } +} + diff --git a/mojo/services/BUILD.gn b/mojo/services/BUILD.gn index ec44710..09753e07 100644 --- a/mojo/services/BUILD.gn +++ b/mojo/services/BUILD.gn @@ -6,15 +6,15 @@ group("services") { deps = [ "//mojo/services/dbus_echo:bindings", "//mojo/services/gles2:bindings", - "//mojo/services/public/interfaces/input_events:bindings", - "//mojo/services/public/interfaces/geometry:bindings", - "//mojo/services/public/interfaces/native_viewport:bindings", - "//mojo/services/public/interfaces/navigation:bindings", - "//mojo/services/public/interfaces/network:bindings", - "//mojo/services/public/interfaces/launcher:bindings", - "//mojo/services/public/interfaces/view_manager:bindings", - "//mojo/services/public/interfaces/surfaces:bindings", - "//mojo/services/public/interfaces/window_manager:core_bindings", + "//mojo/services/public/interfaces/input_events", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/native_viewport", + "//mojo/services/public/interfaces/navigation", + "//mojo/services/public/interfaces/network", + "//mojo/services/public/interfaces/launcher", + "//mojo/services/public/interfaces/view_manager", + "//mojo/services/public/interfaces/surfaces", + "//mojo/services/public/interfaces/window_manager", "//mojo/services/test_service:bindings", ] } diff --git a/mojo/services/gles2/BUILD.gn b/mojo/services/gles2/BUILD.gn index 0b61b7a..ada8edc 100644 --- a/mojo/services/gles2/BUILD.gn +++ b/mojo/services/gles2/BUILD.gn @@ -4,6 +4,23 @@ import("//mojo/public/tools/bindings/mojom.gni") +# GYP version: mojo/mojo_services.gypi:mojo_gles2_service +source_set("gles2") { + deps = [ + ":bindings", + "//base", + "//gpu/command_buffer/service", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/gl", + ] + + sources = [ + "command_buffer_impl.cc", + "command_buffer_impl.h", + ] +} + # GYP version: mojo/mojo_services.gypi:mojo_gles2_bindings mojom("interfaces") { sources = [ diff --git a/mojo/services/native_viewport/BUILD.gn b/mojo/services/native_viewport/BUILD.gn new file mode 100644 index 0000000..18a8974 --- /dev/null +++ b/mojo/services/native_viewport/BUILD.gn @@ -0,0 +1,63 @@ +# 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("//build/config/ui.gni") + +component("native_viewport") { + output_name = "mojo_native_viewport" + + deps = [ + "//base", + "//ui/events", + "//ui/gfx", + "//ui/gfx/geometry", + "//mojo/public/cpp/application", + "//mojo/common", + "//mojo/environment:chromium", + "//mojo/services/public/cpp/geometry", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/gles2", + "//mojo/services/public/cpp/input_events", + "//mojo/services/public/interfaces/native_viewport", + ] + + defines = [ "MOJO_NATIVE_VIEWPORT_IMPLEMENTATION" ] + + sources = [ + "native_viewport.h", + "native_viewport_android.cc", + "native_viewport_mac.mm", + "native_viewport_service.cc", + "native_viewport_service.h", + "native_viewport_win.cc", + ] + + if (is_ios) { + sources += [ "native_viewport_stub.cc" ] + } + + if (is_android) { + deps += [ "//mojo:jni_headers" ] + } + + if (is_win) { + deps += [ + # TODO(GYP) + # '../ui/platform_window/win/win_window.gyp:win_window', + ] + } + + if (use_x11) { + sources += [ "native_viewport_x11.cc" ] + deps += [ "//ui/platform_window/x11" ] + } + + if (use_ozone) { + sources += [ "native_viewport_ozone.cc" ] + } + + if (is_component_build) { + deps += [ "//mojo/system" ] + } +} diff --git a/mojo/services/network/BUILD.gn b/mojo/services/network/BUILD.gn new file mode 100644 index 0000000..87ce11b --- /dev/null +++ b/mojo/services/network/BUILD.gn @@ -0,0 +1,26 @@ +# 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. + +source_set("network") { + deps = [ + "//base", + "//mojo/common", + "//mojo/environment:chromium", + "//mojo/public/cpp/application", + "//mojo/services/public/interfaces/network", + "//net", + "//url", + ] + + sources = [ + "cookie_store_impl.cc", + "cookie_store_impl.h", + "network_context.cc", + "network_context.h", + "network_service_impl.cc", + "network_service_impl.h", + "url_loader_impl.cc", + "url_loader_impl.h", + ] +} diff --git a/mojo/services/public/cpp/geometry/BUILD.gn b/mojo/services/public/cpp/geometry/BUILD.gn new file mode 100644 index 0000000..5f8a9b9 --- /dev/null +++ b/mojo/services/public/cpp/geometry/BUILD.gn @@ -0,0 +1,31 @@ +# 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. + +component("geometry") { + output_name = "mojo_geometry_lib" + + deps = [ + "//skia", + "//ui/gfx", + "//ui/gfx/geometry", + "//mojo/environment:chromium", + "//mojo/services/public/interfaces/geometry", + ] + + forward_dependent_configs_from = [ "//ui/gfx" ] + + defines = [ + "MOJO_GEOMETRY_IMPLEMENTATION", + ] + + sources = [ + "lib/geometry_type_converters.cc", + "geometry_type_converters.h", + "mojo_geometry_export.h", + ] + + if (is_component_build) { + deps += [ "//mojo/system" ] + } +} diff --git a/mojo/services/public/cpp/input_events/BUILD.gn b/mojo/services/public/cpp/input_events/BUILD.gn new file mode 100644 index 0000000..92222db --- /dev/null +++ b/mojo/services/public/cpp/input_events/BUILD.gn @@ -0,0 +1,29 @@ +# 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. + +component("input_events") { + deps = [ + "//base", + "//ui/events", + "//ui/gfx/geometry", + "//mojo/environment:chromium", + "//mojo/services/public/interfaces/input_events", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/cpp/geometry", + ] + + defines = [ + "MOJO_INPUT_EVENTS_IMPLEMENTATION", + ] + + sources = [ + "lib/input_events_type_converters.cc", + "input_events_type_converters.h", + "mojo_input_events_export.h", + ] + + if (is_component_build) { + deps += [ "//mojo/system" ] + } +} diff --git a/mojo/services/public/cpp/view_manager/BUILD.gn b/mojo/services/public/cpp/view_manager/BUILD.gn new file mode 100644 index 0000000..8e707d8 --- /dev/null +++ b/mojo/services/public/cpp/view_manager/BUILD.gn @@ -0,0 +1,46 @@ +# 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. + +source_set("view_manager") { + deps = [ + ":common", + "//base", + "//mojo/public/cpp/application", + "//mojo/public/interfaces/service_provider", + "//mojo/services/public/cpp/geometry", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/view_manager", + "//skia", + "//ui/events", + "//ui/gfx", + "//ui/gfx/geometry", + ] + + sources = [ + "lib/node.cc", + "lib/node_observer.cc", + "lib/node_private.cc", + "lib/node_private.h", + "lib/view.cc", + "lib/view_private.cc", + "lib/view_private.h", + "lib/view_manager_client_factory.cc", + "lib/view_manager_client_impl.cc", + "lib/view_manager_client_impl.h", + "node.h", + "node_observer.h", + "view.h", + "view_manager.h", + "view_manager_client_factory.h", + "view_manager_delegate.h", + "view_observer.h", + "window_manager_delegate.h", + ] +} + +source_set("common") { + sources = [ + "types.h" + ] +} diff --git a/mojo/services/public/interfaces/geometry/BUILD.gn b/mojo/services/public/interfaces/geometry/BUILD.gn index fc3ae6e..3cd9bcd 100644 --- a/mojo/services/public/interfaces/geometry/BUILD.gn +++ b/mojo/services/public/interfaces/geometry/BUILD.gn @@ -5,7 +5,7 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_geometry_bindings -mojom("bindings") { +mojom("geometry") { sources = [ "geometry.mojom", ] diff --git a/mojo/services/public/interfaces/input_events/BUILD.gn b/mojo/services/public/interfaces/input_events/BUILD.gn index a1e1158..ac1c94c 100644 --- a/mojo/services/public/interfaces/input_events/BUILD.gn +++ b/mojo/services/public/interfaces/input_events/BUILD.gn @@ -5,12 +5,12 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_input_events_bindings -mojom("bindings") { +mojom("input_events") { sources = [ "input_events.mojom", ] deps = [ - "//mojo/services/public/interfaces/geometry:bindings", + "//mojo/services/public/interfaces/geometry", ] } diff --git a/mojo/services/public/interfaces/launcher/BUILD.gn b/mojo/services/public/interfaces/launcher/BUILD.gn index 49dce48..02dc51c 100644 --- a/mojo/services/public/interfaces/launcher/BUILD.gn +++ b/mojo/services/public/interfaces/launcher/BUILD.gn @@ -5,12 +5,12 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_launcher_bindings -mojom("bindings") { +mojom("launcher") { sources = [ "launcher.mojom", ] deps = [ - "//mojo/services/public/interfaces/navigation:bindings", + "//mojo/services/public/interfaces/navigation", ] } diff --git a/mojo/services/public/interfaces/native_viewport/BUILD.gn b/mojo/services/public/interfaces/native_viewport/BUILD.gn index eeeb21b..1dfecae 100644 --- a/mojo/services/public/interfaces/native_viewport/BUILD.gn +++ b/mojo/services/public/interfaces/native_viewport/BUILD.gn @@ -5,14 +5,14 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_native_viewport_bindings -mojom("bindings") { +mojom("native_viewport") { sources = [ "native_viewport.mojom", ] deps = [ "//mojo/services/gles2:bindings", - "//mojo/services/public/interfaces/geometry:bindings", - "//mojo/services/public/interfaces/input_events:bindings", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/input_events", ] } diff --git a/mojo/services/public/interfaces/navigation/BUILD.gn b/mojo/services/public/interfaces/navigation/BUILD.gn index e4d186e..73e0578 100644 --- a/mojo/services/public/interfaces/navigation/BUILD.gn +++ b/mojo/services/public/interfaces/navigation/BUILD.gn @@ -5,12 +5,12 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_navigation_bindings -mojom("bindings") { +mojom("navigation") { sources = [ "navigation.mojom", ] deps = [ - "//mojo/services/public/interfaces/network:bindings", + "//mojo/services/public/interfaces/network", ] } diff --git a/mojo/services/public/interfaces/network/BUILD.gn b/mojo/services/public/interfaces/network/BUILD.gn index 5b8dba1..60ee51c 100644 --- a/mojo/services/public/interfaces/network/BUILD.gn +++ b/mojo/services/public/interfaces/network/BUILD.gn @@ -5,8 +5,9 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_network_bindings -mojom("bindings") { +mojom("network") { sources = [ + "cookie_store.mojom", "network_error.mojom", "network_service.mojom", "url_loader.mojom", diff --git a/mojo/services/public/interfaces/surfaces/BUILD.gn b/mojo/services/public/interfaces/surfaces/BUILD.gn index 77c9395..27d56b6 100644 --- a/mojo/services/public/interfaces/surfaces/BUILD.gn +++ b/mojo/services/public/interfaces/surfaces/BUILD.gn @@ -5,7 +5,7 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_surfaces_bindings -mojom("bindings") { +mojom("surfaces") { sources = [ "surfaces.mojom", "surface_id.mojom", @@ -13,7 +13,7 @@ mojom("bindings") { ] deps = [ - "//mojo/services/public/interfaces/geometry:bindings", - "//mojo/services/public/interfaces/native_viewport:bindings", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/native_viewport", ] } diff --git a/mojo/services/public/interfaces/view_manager/BUILD.gn b/mojo/services/public/interfaces/view_manager/BUILD.gn index 9e1d6f0..2c776ff 100644 --- a/mojo/services/public/interfaces/view_manager/BUILD.gn +++ b/mojo/services/public/interfaces/view_manager/BUILD.gn @@ -5,14 +5,14 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_view_manager_bindings -mojom("bindings") { +mojom("view_manager") { sources = [ "view_manager.mojom", "view_manager_constants.mojom", ] deps = [ - "//mojo/services/public/interfaces/geometry:bindings", - "//mojo/services/public/interfaces/input_events:bindings", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/input_events", ] } diff --git a/mojo/services/public/interfaces/window_manager/BUILD.gn b/mojo/services/public/interfaces/window_manager/BUILD.gn index d915bd6..ee50bc5 100644 --- a/mojo/services/public/interfaces/window_manager/BUILD.gn +++ b/mojo/services/public/interfaces/window_manager/BUILD.gn @@ -5,7 +5,7 @@ import("//mojo/public/tools/bindings/mojom.gni") # GYP version: mojo/mojo_services.gypi:mojo_core_window_manager_bindings -mojom("core_bindings") { +mojom("window_manager") { sources = [ "window_manager.mojom", ] diff --git a/mojo/services/view_manager/BUILD.gn b/mojo/services/view_manager/BUILD.gn new file mode 100644 index 0000000..d6372cc --- /dev/null +++ b/mojo/services/view_manager/BUILD.gn @@ -0,0 +1,75 @@ +# 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. + +component("view_manager") { + deps = [ + "//base", + "//cc", + "//mojo/cc", + "//mojo/common", + "//mojo/environment:chromium", + "//mojo/public/cpp/application", + "//mojo/public/cpp/application:main_chromium", + "//mojo/public/gles2", + "//mojo/services/public/cpp/geometry", + "//mojo/services/public/cpp/input_events", + "//mojo/services/public/cpp/view_manager:common", + "//mojo/services/public/interfaces/geometry", + "//mojo/services/public/interfaces/input_events", + "//mojo/services/public/interfaces/native_viewport", + "//mojo/services/public/interfaces/view_manager", + "//skia", + "//ui/aura", + "//ui/base", + "//ui/compositor", + "//ui/events", + "//ui/events:events_base", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/gl", + "//webkit/common/gpu", + ] + + defines = [ + "MOJO_VIEW_MANAGER_IMPLEMENTATION", + ] + + sources = [ + "access_policy.h", + "access_policy_delegate.h", + "context_factory_impl.cc", + "context_factory_impl.h", + "default_access_policy.cc", + "default_access_policy.h", + "ids.h", + "main.cc", + "node.cc", + "node.h", + "node_delegate.h", + "root_node_manager.cc", + "root_node_manager.h", + "root_view_manager.cc", + "root_view_manager.h", + "root_view_manager_delegate.h", + "screen_impl.cc", + "screen_impl.h", + "view.cc", + "view.h", + "view_manager_export.h", + "view_manager_init_service_context.cc", + "view_manager_init_service_context.h", + "view_manager_init_service_impl.cc", + "view_manager_init_service_impl.h", + "view_manager_service_impl.cc", + "view_manager_service_impl.h", + "window_manager_access_policy.cc", + "window_manager_access_policy.h", + "window_tree_host_impl.cc", + "window_tree_host_impl.h", + ] + + if (is_component_build) { + deps += [ "//mojo/system" ] + } +} diff --git a/mojo/shell/BUILD.gn b/mojo/shell/BUILD.gn new file mode 100644 index 0000000..fbcbf82 --- /dev/null +++ b/mojo/shell/BUILD.gn @@ -0,0 +1,126 @@ +# 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/tools/bindings/mojom.gni") +import("//build/config/ui.gni") + +executable("mojo_shell") { + deps = [ + ":lib", + "//base", + "//mojo/common", + "//mojo/environment:chromium", + "//mojo/service_manager", + "//mojo/system", + "//third_party/icu", + "//ui/gl", + "//url", + ] + + if (use_ozone) { + deps += [ "//ui/ozone" ] + } + + sources = [ + "desktop/mojo_main.cc" + ] +} +source_set("lib") { + deps = [ + ":app_child_process_bindings", + ":external_service_bindings", + "//base", + "//base/third_party/dynamic_annotations", + "//base:base_static", + "//mojo/common", + "//mojo/gles2", + "//mojo/public/cpp/application", + "//mojo/public/interfaces/service_provider", + "//mojo/service_manager", + "//mojo/services/native_viewport", + "//mojo/services/public/interfaces/native_viewport", + "//mojo/services/public/interfaces/network", + "//mojo/spy", + "//mojo/system", + "//net", + "//url", + ] + + sources = [ + "app_child_process.cc", + "app_child_process.h", + "app_child_process_host.cc", + "app_child_process_host.h", + "child_process.cc", + "child_process.h", + "child_process_host.cc", + "child_process_host.h", + "context.cc", + "context.h", + "dbus_service_loader_linux.cc", + "dbus_service_loader_linux.h", + "dynamic_service_loader.cc", + "dynamic_service_loader.h", + "dynamic_service_runner.h", + "init.cc", + "init.h", + "in_process_dynamic_service_runner.cc", + "in_process_dynamic_service_runner.h", + "keep_alive.cc", + "keep_alive.h", + "mojo_url_resolver.cc", + "mojo_url_resolver.h", + "out_of_process_dynamic_service_runner.cc", + "out_of_process_dynamic_service_runner.h", + "run.cc", + "run.h", + "switches.cc", + "switches.h", + "task_runners.cc", + "task_runners.h", + "test_child_process.cc", + "test_child_process.h", + "ui_service_loader_android.cc", + "ui_service_loader_android.h", + ] + + if (is_linux) { + deps += [ + "//dbus" + ] + } else if (is_android) { + deps += [ + "//mojo/services/network", + ] + sources += [ + "network_service_loader.cc", + "network_service_loader.h", + ] + } + if (use_aura) { + deps += [ + # These are only necessary as long as we hard code use of ViewManager. + "//skia", + "//mojo/public/gles2", + "//mojo/services/view_manager", + "//mojo/services/public/interfaces/view_manager", + ] + sources += [ + "view_manager_loader.cc", + "view_manager_loader.h", + ] + } +} + +mojom("app_child_process_bindings") { + sources = [ + "app_child_process.mojom" + ] +} + +mojom("external_service_bindings") { + sources = [ + "external_service.mojom" + ] +} diff --git a/mojo/spy/BUILD.gn b/mojo/spy/BUILD.gn new file mode 100644 index 0000000..2fc59be --- /dev/null +++ b/mojo/spy/BUILD.gn @@ -0,0 +1,32 @@ +# 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/tools/bindings/mojom.gni") + +source_set("spy") { + deps = [ + ":spy_bindings", + "//base", + "//base:base_static", + "//net:http_server", + "//url", + "//mojo/service_manager", + ] + + sources = [ + "common.h", + "spy.cc", + "spy.h", + "spy_server_impl.h", + "spy_server_impl.cc", + "websocket_server.cc", + "websocket_server.h", + ] +} + +mojom("spy_bindings") { + sources = [ + "public/spy.mojom", + ] +} diff --git a/ui/platform_window/BUILD.gn b/ui/platform_window/BUILD.gn new file mode 100644 index 0000000..aa0c85d --- /dev/null +++ b/ui/platform_window/BUILD.gn @@ -0,0 +1,13 @@ +# 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. + +component("platform_window") { + defines = [ "PLATFORM_WINDOW_IMPLEMENTATION" ] + + sources = [ + "platform_window.h", + "platform_window_delegate.h", + "platform_window_export.h", + ] +} diff --git a/ui/platform_window/platform_window.gyp b/ui/platform_window/platform_window.gyp index 15162bf..a01fb37 100644 --- a/ui/platform_window/platform_window.gyp +++ b/ui/platform_window/platform_window.gyp @@ -7,6 +7,7 @@ 'chromium_code': 1, }, 'targets': [{ + # GN version: //ui/platform_window 'target_name': 'platform_window', 'type': '<(component)', 'defines': [ 'PLATFORM_WINDOW_IMPLEMENTATION' ], diff --git a/ui/platform_window/x11/BUILD.gn b/ui/platform_window/x11/BUILD.gn new file mode 100644 index 0000000..bf0ba67 --- /dev/null +++ b/ui/platform_window/x11/BUILD.gn @@ -0,0 +1,28 @@ +# 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. + +component("x11") { + output_name = "x11_window" + + deps = [ + "//base", + "//skia", + "//ui/events", + "//ui/events/platform/x11", + "//ui/gfx/x", + "//ui/platform_window", + ] + + configs += [ + "//build/config/linux:x11" + ] + + defines = [ "X11_WINDOW_IMPLEMENTATION" ] + + sources = [ + "x11_window.cc", + "x11_window.h", + "x11_window_export.h", + ] +} diff --git a/ui/platform_window/x11/x11_window.gyp b/ui/platform_window/x11/x11_window.gyp index efb86c8..4dff63a 100644 --- a/ui/platform_window/x11/x11_window.gyp +++ b/ui/platform_window/x11/x11_window.gyp @@ -8,6 +8,7 @@ 'use_x11': 1, }, 'targets': [{ + # GN version: //ui/platform_window/x11 'target_name': 'x11_window', 'type': '<(component)', 'dependencies': [ |