chromium/ui/platform_window/BUILD.gn

# Copyright 2014 The Chromium Authors
# 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("platform_window") {
  sources = [
    "extensions/workspace_extension.cc",
    "extensions/workspace_extension.h",
    "extensions/workspace_extension_delegate.h",
    "platform_window.cc",
    "platform_window.h",
    "platform_window_delegate.cc",
    "platform_window_delegate.h",
    "platform_window_init_properties.cc",
    "platform_window_init_properties.h",
  ]

  defines = [ "IS_PLATFORM_WINDOW_IMPL" ]

  public_deps = []

  deps = [
    "//base",
    "//ui/base",
    "//ui/gfx",
  ]

  if (is_fuchsia) {
    sources += [
      "fuchsia/initialize_presenter_api_view.cc",
      "fuchsia/initialize_presenter_api_view.h",
      "fuchsia/scenic_window_delegate.h",
      "fuchsia/view_ref_pair.cc",
      "fuchsia/view_ref_pair.h",
    ]

    public_deps += [
      "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.element:fuchsia.element_hlcpp",
      "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_hlcpp",
      "//third_party/fuchsia-sdk/sdk/pkg/scenic_cpp",
      "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
    ]
  }

  if (is_linux || is_chromeos) {
    sources += [
      "extensions/desk_extension.cc",
      "extensions/desk_extension.h",
      "extensions/pinned_mode_extension.cc",
      "extensions/pinned_mode_extension.h",
      "extensions/system_modal_extension.cc",
      "extensions/system_modal_extension.h",
      "extensions/wayland_extension.cc",
      "extensions/wayland_extension.h",
    ]
    deps += [ "//ui/base/dragdrop/mojom:mojom_headers" ]
  }
  if (is_linux || is_chromeos_ash) {
    sources += [
      "extensions/x11_extension.cc",
      "extensions/x11_extension.h",
      "extensions/x11_extension_delegate.h",
    ]
  }
}

group("platform_impls") {
  public_deps = [ "//ui/platform_window/stub" ]
  if (is_win) {
    public_deps += [ "//ui/platform_window/win" ]
  }
}