chromium/ios/web/web_state/BUILD.gn

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

import("//ios/build/config.gni")

source_set("web_state") {
  deps = [
    ":policy_decision_state_tracker",
    ":web_state_impl_header",
    "//base",
    "//build:blink_buildflags",
    "//components/security_state/core",
    "//ios/third_party/webkit",
    "//ios/web/common",
    "//ios/web/js_messaging",
    "//ios/web/js_messaging:java_script_feature",
    "//ios/web/js_messaging:web_view_js_utils",
    "//ios/web/navigation",
    "//ios/web/navigation:core",
    "//ios/web/navigation:wk_navigation_util",
    "//ios/web/public",
    "//ios/web/public/deprecated",
    "//ios/web/public/js_messaging",
    "//ios/web/public/security",
    "//ios/web/public/session",
    "//ios/web/public/session/proto",
    "//ios/web/public/session/proto:proto_util",
    "//ios/web/public/webui",
    "//ios/web/security",
    "//ios/web/session",
    "//ios/web/web_state/ui",
    "//ios/web/web_state/ui:crw_web_view_navigation_proxy",
    "//ios/web/web_view:util",
    "//ios/web/webui",
    "//net",
    "//ui/gfx",
  ]

  if (use_blink) {
    deps += [ "//ios/web/content" ]
  }

  sources = [
    "global_web_state_event_tracker.h",
    "global_web_state_event_tracker.mm",
    "global_web_state_observer.mm",
    "web_state.mm",
    "web_state_delegate.mm",
    "web_state_delegate_bridge.mm",
    "web_state_factory.mm",
    "web_state_id.cc",
    "web_state_impl.mm",
    "web_state_impl_realized_web_state.h",
    "web_state_impl_realized_web_state.mm",
    "web_state_impl_serialized_data.h",
    "web_state_impl_serialized_data.mm",
    "web_state_observer.mm",
    "web_state_observer_bridge.mm",
    "web_state_policy_decider.mm",
    "web_state_policy_decider_bridge.mm",
  ]

  frameworks = [ "QuartzCore.framework" ]
}

source_set("web_state_impl_header") {
  deps = [
    "//base",
    "//ios/web/navigation:core",
    "//ios/web/public",
  ]

  sources = [ "web_state_impl.h" ]
}

source_set("web_view_internal_creation_util") {
  deps = [
    "//base",
    "//ios/web/common",
    "//ios/web/common:user_agent",
    "//ios/web/public",
    "//ios/web/web_state/ui:crw_context_menu_controller",
    "//ios/web/web_state/ui:wk_web_view_configuration_provider",
  ]

  sources = [
    "crw_web_view.h",
    "crw_web_view.mm",
    "web_view_internal_creation_util.h",
    "web_view_internal_creation_util.mm",
  ]
}

source_set("user_interaction") {
  sources = [
    "user_interaction_event.h",
    "user_interaction_state.h",
    "user_interaction_state.mm",
  ]

  deps = [
    "//base",
    "//ios/third_party/webkit",
    "//url",
  ]
}

source_set("policy_decision_state_tracker") {
  sources = [
    "policy_decision_state_tracker.h",
    "policy_decision_state_tracker.mm",
  ]

  deps = [
    "//base",
    "//ios/web/public",
  ]
}

source_set("test_util") {
  testonly = true

  sources = [
    "web_state_policy_decider_test_util.h",
    "web_state_policy_decider_test_util.mm",
  ]

  deps = [ "//ios/web/public/navigation" ]
}