chromium/extensions/browser/api/messaging/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("//extensions/buildflags/buildflags.gni")

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

source_set("messaging") {
  sources = [
    "channel_endpoint.cc",
    "channel_endpoint.h",
    "extension_message_port.cc",
    "extension_message_port.h",
    "message_port.cc",
    "message_port.h",
    "message_service.cc",
    "message_service.h",
    "message_service_bindings.cc",
    "messaging_delegate.cc",
    "messaging_delegate.h",
  ]

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

  deps = [
    ":native_messaging",
    "//base",
    "//components/back_forward_cache",
    "//components/crx_file:crx_file",
    "//components/keyed_service/content:content",
    "//content/public/browser",
    "//content/public/common",
    "//extensions/buildflags",
    "//extensions/common",
    "//extensions/common/api",
  ]

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

# Split up from messaging to avoid circular dependency.
source_set("native_messaging") {
  sources = [
    "native_message_host.cc",
    "native_message_host.h",
    "native_messaging_channel.h",
  ]

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

  deps = [
    "//base",
    "//ui/gfx:native_widget_types",
  ]
}