chromium/ios/chrome/browser/ui/fullscreen/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.

source_set("fullscreen") {
  sources = [
    "animated_scoped_fullscreen_disabler.h",
    "animated_scoped_fullscreen_disabler.mm",
    "fullscreen_controller.h",
    "fullscreen_controller.mm",
    "fullscreen_controller_observer.h",
    "fullscreen_controller_observer.mm",
    "fullscreen_ui_updater.h",
    "scoped_fullscreen_disabler.h",
    "scoped_fullscreen_disabler.mm",
  ]

  allow_circular_includes_from = [ ":internal" ]

  deps = [
    ":internal",
    ":ui",
    "//base",
    "//components/keyed_service/core",
    "//components/keyed_service/ios",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/common",
  ]
}

source_set("coordinators") {
  sources = [
    "chrome_coordinator+fullscreen_disabling.h",
    "chrome_coordinator+fullscreen_disabling.mm",
  ]

  deps = [
    ":fullscreen",
    "//base",
    "//ios/chrome/browser/shared/coordinator/chrome_coordinator",
    "//ios/chrome/browser/shared/model/browser",
  ]
}

source_set("internal") {
  sources = [
    "fullscreen_browser_observer.h",
    "fullscreen_browser_observer.mm",
    "fullscreen_content_adjustment_util.h",
    "fullscreen_content_adjustment_util.mm",
    "fullscreen_controller_impl.h",
    "fullscreen_controller_impl.mm",
    "fullscreen_mediator.h",
    "fullscreen_mediator.mm",
    "fullscreen_model.h",
    "fullscreen_model.mm",
    "fullscreen_model_observer.h",
    "fullscreen_model_observer.mm",
    "fullscreen_system_notification_observer.h",
    "fullscreen_system_notification_observer.mm",
    "fullscreen_ui_updater.mm",
    "fullscreen_web_state_list_observer.h",
    "fullscreen_web_state_list_observer.mm",
    "fullscreen_web_state_observer.h",
    "fullscreen_web_state_observer.mm",
    "fullscreen_web_view_proxy_observer.h",
    "fullscreen_web_view_proxy_observer.mm",
    "fullscreen_web_view_resizer.h",
    "fullscreen_web_view_resizer.mm",
  ]

  deps = [
    ":ui",
    "//base",
    "//components/keyed_service/ios",
    "//components/ukm/ios:ukm_url_recorder",
    "//ios/chrome/browser/find_in_page/model:util",
    "//ios/chrome/browser/ntp/ui_bundled:logo",
    "//ios/chrome/browser/shared/model/browser",
    "//ios/chrome/browser/shared/model/browser_state",
    "//ios/chrome/browser/shared/model/url:constants",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/broadcaster",
    "//ios/chrome/common:timing",
    "//ios/chrome/common/ui/util",
    "//ios/public/provider/chrome/browser/fullscreen:fullscreen_api",
    "//ios/web/common",
    "//ios/web/public/security",
    "//services/metrics/public/cpp:ukm_builders",
    "//ui/gfx/geometry",
  ]

  public_deps = [ "//ios/web/public" ]
}

source_set("ui") {
  sources = [
    "fullscreen_animator.h",
    "fullscreen_animator.mm",
    "fullscreen_ui_element.h",
  ]

  deps = [
    "//base",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/common:timing",
    "//ui/gfx/geometry",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "fullscreen_browser_observer_unittest.mm",
    "fullscreen_mediator_unittest.mm",
    "fullscreen_model_unittest.mm",
    "fullscreen_ui_updater_unittest.mm",
    "fullscreen_web_state_list_observer_unittest.mm",
    "fullscreen_web_state_observer_unittest.mm",
    "fullscreen_web_view_resizer_unittest.mm",
  ]

  deps = [
    ":fullscreen",
    ":internal",
    ":ui",
    "//base/test:test_support",
    "//ios/chrome/browser/shared/model/browser/test:test_support",
    "//ios/chrome/browser/shared/model/profile/test",
    "//ios/chrome/browser/shared/model/web_state_list",
    "//ios/chrome/browser/shared/model/web_state_list/test:test_support",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/ui/broadcaster",
    "//ios/chrome/browser/ui/fullscreen/test",
    "//ios/chrome/common/ui/util",
    "//ios/web/common",
    "//ios/web/public",
    "//ios/web/public/security",
    "//ios/web/public/test/fakes",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/ocmock",
  ]
}

source_set("eg2_tests") {
  configs += [ "//build/config/ios:xctest_config" ]
  testonly = true
  sources = [ "fullscreen_egtest.mm" ]
  deps = [
    "//base",
    "//base/test:test_support",
    "//components/translate/core/browser:translate_pref_names",
    "//ios/chrome/browser/shared/model/prefs:pref_names",
    "//ios/chrome/browser/shared/public/features",
    "//ios/chrome/browser/shared/ui/util",
    "//ios/chrome/browser/ui/fullscreen/test:eg_test_support+eg2",
    "//ios/chrome/test:eg_test_support+eg2",
    "//ios/chrome/test/earl_grey:eg_test_support+eg2",
    "//ios/testing/earl_grey:eg_test_support+eg2",
    "//ios/web/common",
    "//ios/web/public/test/http_server",
    "//url",
  ]
  frameworks = [ "UIKit.framework" ]
}