| # Copyright 2026 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//components/surface_embed/buildflags/buildflags.gni") |
| |
| assert(enable_surface_embed) |
| |
| # This is a static_library instead of a component. |
| # The `mojom` target generated code is linked into this target. If this were a |
| # component (shared library), the mojom symbols would be hidden within it |
| # unless explicitly exported. Since the mojom target does not have export |
| # attributes, we use a static_library so that the linker of the final |
| # executable can see the mojom symbols directly. |
| static_library("browser") { |
| sources = [ |
| "surface_embed_host.cc", |
| "surface_embed_host.h", |
| ] |
| |
| public_deps = [ |
| "//base", |
| "//components/surface_embed/common:mojom", |
| "//components/viz/host", |
| "//mojo/public/cpp/bindings", |
| "//services/viz/public/mojom", |
| "//third_party/blink/public/common", |
| ] |
| |
| deps = [ |
| "//components/guest_contents/browser", |
| "//components/viz/common", |
| "//content/public/browser", |
| "//skia", |
| "//ui/compositor", |
| "//ui/gfx/geometry", |
| ] |
| } |
| |
| source_set("browser_tests") { |
| testonly = true |
| |
| defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] |
| |
| sources = [ "surface_embed_plugin_browsertest.cc" ] |
| |
| deps = [ |
| ":browser", |
| "//base", |
| "//base/test:test_support", |
| "//components/guest_contents/browser", |
| "//components/surface_embed/common", |
| "//content/public/browser", |
| "//content/shell:content_shell_lib", |
| "//content/test:browsertest_support", |
| "//content/test:test_support", |
| "//mojo/public/cpp/bindings", |
| "//net:test_support", |
| "//skia", |
| "//testing/gmock", |
| "//testing/gtest", |
| "//third_party/blink/public/common:headers", |
| "//ui/compositor", |
| "//ui/gfx", |
| "//url", |
| ] |
| } |