# 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/apple/swift_source_set.gni") source_set("model") { public = [ "legacy_image_file_manager.h", "legacy_snapshot_generator.h", "legacy_snapshot_lru_cache.h", "legacy_snapshot_storage.h", "snapshot_browser_agent.h", "snapshot_storage_util.h", "snapshot_tab_helper.h", ] sources = [ "legacy_image_file_manager.mm", "legacy_snapshot_generator.mm", "legacy_snapshot_lru_cache.mm", "legacy_snapshot_manager.h", "legacy_snapshot_manager.mm", "legacy_snapshot_storage.mm", "snapshot_browser_agent.mm", "snapshot_storage_util.mm", "snapshot_tab_helper.mm", ] deps = [ ":constants", ":features", ":model_common", ":model_swift", ":snapshot_source", "//base", "//build:blink_buildflags", "//ios/chrome/browser/ntp/model:util", "//ios/chrome/browser/shared/model/browser", "//ios/chrome/browser/shared/model/profile", "//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/tabs/model:dependency_installer", "//ios/third_party/webkit", "//ios/web/public", "//ui/gfx", ] frameworks = [ "QuartzCore.framework", "UIKit.framework", ] } source_set("model_common") { sources = [ "snapshot_id.h", "snapshot_id_wrapper.h", "snapshot_id_wrapper.mm", "snapshot_kind.h", "snapshot_scale.h", "snapshot_scale.mm", "snapshot_types.h", "snapshot_util.h", "snapshot_util.mm", "web_state_snapshot_info.h", "web_state_snapshot_info.mm", ] deps = [ ":snapshot_source", "//base", "//ios/chrome/browser/net/model:crurl", "//ios/web/public", "//ui/base", ] } source_set("snapshot_source") { sources = [ "snapshot_source_tab_helper.h", "snapshot_source_tab_helper.mm", ] deps = [ "//base", "//ios/web/public", ] } swift_source_set("model_swift") { bridge_header = "snapshot_swift_bridge.h" sources = [ "image_file_manager.swift", "snapshot_generator.swift", "snapshot_generator_delegate.swift", "snapshot_lru_cache.swift", "snapshot_manager.swift", "snapshot_manager_impl.swift", "snapshot_storage.swift", "snapshot_storage_impl.swift", "snapshot_storage_observer.swift", ] deps = [ ":features", ":model_common", "//base", "//ios/chrome/browser/shared/public/metrics:metrics_bridge", "//ios/chrome/browser/shared/ui/util:util_bridge", ] public_deps = [ "//base" ] } source_set("features") { sources = [ "features.h", "features.mm", ] deps = [ "//base" ] } source_set("constants") { sources = [ "constants.h" ] deps = [ "//base" ] } source_set("test_utils") { testonly = true sources = [ "fake_snapshot_generator_delegate.h", "fake_snapshot_generator_delegate.mm", ] deps = [ ":model", ":model_swift", ] } source_set("unit_tests") { testonly = true sources = [ "image_file_manager_unittest.mm", "snapshot_browser_agent_unittest.mm", "snapshot_generator_unittest.mm", "snapshot_id_wrapper_unittest.mm", "snapshot_lru_cache_unittest.mm", "snapshot_source_tab_helper_unittest.mm", "snapshot_storage_unittest.mm", "snapshot_tab_helper_unittest.mm", ] deps = [ ":constants", ":features", ":model", ":model_common", ":model_swift", ":snapshot_source", ":test_utils", "//base", "//base/test:test_support", "//components/sessions:session_id", "//ios/chrome/browser/shared/model/browser", "//ios/chrome/browser/shared/model/browser/test:test_support", "//ios/chrome/browser/shared/model/profile/test", "//ios/chrome/browser/shared/ui/util", "//ios/chrome/browser/shared/ui/util/image", "//ios/web", "//ios/web/common:uikit", "//ios/web/public/test", "//ios/web/public/test/fakes", "//testing/gmock", "//testing/gtest", "//third_party/ocmock", "//ui/base:test_support", "//ui/gfx", ] } source_set("eg2_tests") { configs += [ "//build/config/ios:xctest_config" ] testonly = true sources = [ "snapshot_egtest.mm" ] deps = [ "//ios/chrome/browser/shared/ui/util/image", "//ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/grid:grid_ui_constants", "//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/testing/earl_grey:eg_test_support+eg2", "//net:test_support", "//ui/gfx", ] frameworks = [ "UIKit.framework" ] }