# Copyright 2016 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("//services/service_manager/public/service_manifest.gni")

source_set("mash") {
  sources = [
    "mash_runner.cc",
    "mash_runner.h",
  ]
  deps = [
    "//ash/resources",
    "//base:i18n",
    "//components/tracing:startup_tracing",
    "//content/public/common",
    "//mash/package",
    "//services/catalog/public/interfaces",
    "//services/service_manager",
    "//services/service_manager/background:lib",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/interfaces",
    "//services/service_manager/runner:init",
    "//services/service_manager/runner/common",
    "//services/service_manager/runner/host:child_process_base",
    "//services/service_manager/runner/host:lib",
    "//url",
  ]
  data_deps = [
    ":browser_manifest",
    ":mash_manifest",
    "//chrome/app:service_manifests",
  ]

  if (is_linux && !is_android) {
    deps += [ "//components/font_service:lib" ]
  }
}

service_manifest("mash_manifest") {
  name = "chrome_mash"
  source = "chrome_mash_manifest.json"
  deps = [
    "//ash/autoclick/mus:manifest",
    "//ash/mus:manifest",
    "//ash/touch_hud/mus:manifest",
    "//mash/catalog_viewer:manifest",
    "//mash/quick_launch:manifest",
    "//mash/session:manifest",
    "//mash/task_viewer:manifest",
    "//services/ui:manifest",
    "//services/ui/ime/test_ime_driver:manifest",
  ]
  packaged_services = [
    "accessibility_autoclick",
    "ash",
    "catalog_viewer",
    "mash_session",
    "quick_launch",
    "task_viewer",
    "test_ime_driver",
    "touch_hud",
    "ui",
  ]

  if (is_linux && !is_android) {
    deps += [ "//components/font_service:manifest" ]
    packaged_services += [ "font_service" ]
  }
}

service_manifest("browser_manifest") {
  name = "content_browser"
  source = "${root_out_dir}/Packages/chrome_content_browser/manifest.json"
  output_name = "chrome_mash_content_browser"
  deps = [
    "//chrome/app:chrome_content_browser_manifest",
  ]
  overlays = [ "chrome_mash_content_browser_manifest_overlay.json" ]
}
