# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. source_set("sessions") { configs += [ "//build/config/compiler:enable_arc" ] sources = [ "ios_chrome_session_tab_helper.h", "ios_chrome_session_tab_helper.mm", "ios_chrome_tab_restore_service_client.h", "ios_chrome_tab_restore_service_client.mm", "ios_chrome_tab_restore_service_factory.cc", "ios_chrome_tab_restore_service_factory.h", "live_tab_context_browser_agent.h", "live_tab_context_browser_agent.mm", ] public_deps = [ "//components/sessions" ] deps = [ ":serialisation", "//base", "//components/keyed_service/core", "//components/keyed_service/ios", "//components/tab_groups", "//ios/chrome/browser", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/main:public", "//ios/chrome/browser/tabs", "//ios/chrome/browser/web_state_list", "//ios/public/provider/chrome/browser", "//ios/web", "//ios/web/public/security", "//ios/web/public/session", "//net", "//url", ] frameworks = [ "UIKit.framework" ] } source_set("restoration_observer") { sources = [ "session_restoration_observer.h" ] deps = [ "//base" ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("restoration_agent") { sources = [ "session_restoration_browser_agent.h", "session_restoration_browser_agent.mm", ] deps = [ ":restoration_observer", ":serialisation", ":session_service", "//components/favicon/ios", "//components/previous_session_info", "//ios/chrome/browser:chrome_url_constants", "//ios/chrome/browser/browser_state", "//ios/chrome/browser/main:public", "//ios/chrome/browser/ui/util:multiwindow_util", "//ios/chrome/browser/web:page_placeholder", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list/web_usage_enabler", "//ios/web/public/security", "//ios/web/public/session", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("session_service") { sources = [ "session_ios_factory.h", "session_ios_factory.mm", "session_service_ios.h", "session_service_ios.mm", ] deps = [ ":serialisation", "//base", "//ios/chrome/browser/web_state_list", "//ios/web/public/session", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("serialisation") { sources = [ "NSCoder+Compatibility.h", "NSCoder+Compatibility.mm", "session_ios.h", "session_ios.mm", "session_util.h", "session_util.mm", "session_window_ios.h", "session_window_ios.mm", ] deps = [ "//base", "//components/sessions", "//ios/chrome/browser/browser_state", "//ios/web", "//ios/web/public/session", ] configs += [ "//build/config/compiler:enable_arc" ] } source_set("test_support") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "test_session_service.h", "test_session_service.mm", ] deps = [ ":serialisation", ":session_service", "//base", ] } source_set("unit_tests") { configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ "session_restoration_browser_agent_unittest.mm", "session_service_ios_unittest.mm", "session_window_ios_unittest.mm", ] deps = [ ":resources_unit_tests", ":restoration_agent", ":restoration_observer", ":serialisation", ":session_service", ":sessions", ":test_support", "//base", "//base/test:test_support", "//ios/chrome/browser", "//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/main", "//ios/chrome/browser/main:test_support", "//ios/chrome/browser/ntp", "//ios/chrome/browser/web:web_internal", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/browser/web_state_list/web_usage_enabler", "//ios/chrome/test:test_support", "//ios/web", "//ios/web/public/session", "//ios/web/public/test", "//ios/web/public/test/fakes", "//testing/gtest", "//third_party/ocmock", ] frameworks = [ "Foundation.framework" ] } bundle_data("resources_unit_tests") { visibility = [ ":unit_tests" ] testonly = true sources = [ "//ios/chrome/test/data/sessions/corrupted.plist", "//ios/chrome/test/data/sessions/session_m57.plist", "//ios/chrome/test/data/sessions/session_m58.plist", ] outputs = [ "{{bundle_resources_dir}}/ios/chrome/test/data/sessions/{{source_file_part}}" ] }