chromium/extensions/browser/api/socket/BUILD.gn

# Copyright 2016 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/chromeos/ui_mode.gni")
import("//extensions/buildflags/buildflags.gni")

assert(enable_extensions,
       "Cannot depend on extensions because enable_extensions=false.")

source_set("socket") {
  sources = [
    "mojo_data_pump.cc",
    "mojo_data_pump.h",
    "socket.cc",
    "socket.h",
    "socket_api.cc",
    "socket_api.h",
    "tcp_socket.cc",
    "tcp_socket.h",
    "tls_socket.cc",
    "tls_socket.h",
    "udp_socket.cc",
    "udp_socket.h",
  ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  deps = [
    "//build:chromeos_buildflags",
    "//content/public/browser",
    "//content/public/common",
    "//extensions/common",
    "//extensions/common/api",
  ]

  if (is_chromeos) {
    sources += [
      "app_firewall_hole_manager.cc",
      "app_firewall_hole_manager.h",
    ]

    deps += [
      "//chromeos/components/firewall_hole",
      "//components/keyed_service/content",
    ]
  }

  public_deps = [ "//extensions/browser:browser_sources" ]
}