chromium/components/guest_view/browser/BUILD.gn

# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Currently, GuestViews are only used by extensions, so we have this
# assert to prevent the accidental building of GuestViews on mobile
# platforms. If you're now using GuestViews on mobile, go ahead and
# remove this assert.
assert(!is_android)

static_library("browser") {
  output_name = "guest_view_browser"
  sources = [
    "//components/guest_view/browser/bad_message.cc",
    "//components/guest_view/browser/bad_message.h",
    "//components/guest_view/browser/guest_view.h",
    "//components/guest_view/browser/guest_view_base.cc",
    "//components/guest_view/browser/guest_view_base.h",
    "//components/guest_view/browser/guest_view_event.cc",
    "//components/guest_view/browser/guest_view_event.h",
    "//components/guest_view/browser/guest_view_histogram_value.h",
    "//components/guest_view/browser/guest_view_manager.cc",
    "//components/guest_view/browser/guest_view_manager.h",
    "//components/guest_view/browser/guest_view_manager_delegate.cc",
    "//components/guest_view/browser/guest_view_manager_delegate.h",
    "//components/guest_view/browser/guest_view_manager_factory.h",
    "//components/guest_view/browser/guest_view_message_handler.cc",
    "//components/guest_view/browser/guest_view_message_handler.h",
  ]

  public_deps = [
    "//base",
    "//components/guest_view/common",
  ]
  deps = [
    "//build:chromeos_buildflags",
    "//components/crash/core/common:crash_key",
    "//components/guest_view/common:mojom",
    "//components/zoom",
    "//content/public/browser",
    "//content/public/common",
    "//third_party/blink/public/common",
    "//url",
  ]
}

static_library("test_support") {
  testonly = true
  sources = [
    "//components/guest_view/browser/test_guest_view_manager.cc",
    "//components/guest_view/browser/test_guest_view_manager.h",
  ]

  public_deps = [
    ":browser",
    "//content/test:test_support",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [ "guest_view_manager_unittest.cc" ]
  deps = [
    ":test_support",
    "//testing/gtest",
  ]
}