123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- # Copyright 2014 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.
- if (is_android) {
- import("//build/config/android/config.gni")
- }
- config("implementation") {
- defines = [ "SESSIONS_IMPLEMENTATION" ]
- }
- if (!is_ios) {
- component("sessions") {
- sources = [
- "content/content_live_tab.cc",
- "content/content_live_tab.h",
- "content/content_platform_specific_tab_data.cc",
- "content/content_platform_specific_tab_data.h",
- "content/content_record_password_state.cc",
- "content/content_record_password_state.h",
- "content/content_serialized_navigation_builder.cc",
- "content/content_serialized_navigation_builder.h",
- "content/content_serialized_navigation_driver.cc",
- "content/content_serialized_navigation_driver.h",
- "content/extended_info_handler.h",
- "content/navigation_task_id.cc",
- "content/navigation_task_id.h",
- "content/session_tab_helper.cc",
- "content/session_tab_helper.h",
- "content/session_tab_helper_delegate.h",
- ]
- configs += [ ":implementation" ]
- public_deps = [
- ":shared",
- "//content/public/browser",
- ]
- deps = [
- "//base",
- "//base/third_party/dynamic_annotations",
- "//content/public/common",
- "//ui/base",
- "//url",
- ]
- }
- } else {
- source_set("sessions") {
- configs += [ "//build/config/compiler:enable_arc" ]
- sources = [
- "ios/ios_live_tab.h",
- "ios/ios_live_tab.mm",
- "ios/ios_restore_live_tab.h",
- "ios/ios_restore_live_tab.mm",
- "ios/ios_serialized_navigation_builder.h",
- "ios/ios_serialized_navigation_builder.mm",
- "ios/ios_serialized_navigation_driver.cc",
- "ios/ios_serialized_navigation_driver.h",
- "ios/ios_webstate_live_tab.h",
- "ios/ios_webstate_live_tab.mm",
- ]
- public_deps = [
- ":shared",
- "//ios/web",
- ]
- deps = [
- "//base",
- "//ios/web/common",
- "//ios/web/public/session",
- ]
- }
- }
- component("session_id") {
- sources = [
- "core/session_id.cc",
- "core/session_id.h",
- "core/session_id_generator.cc",
- "core/session_id_generator.h",
- ]
- configs += [ ":implementation" ]
- deps = [
- "//base",
- "//components/prefs",
- ]
- }
- # Sources shared between the content and iOS implementations.
- source_set("shared") {
- visibility = [ ":*" ]
- sources = [
- "core/base_session_service_commands.cc",
- "core/base_session_service_commands.h",
- "core/command_storage_backend.cc",
- "core/command_storage_backend.h",
- "core/command_storage_manager.cc",
- "core/command_storage_manager.h",
- "core/command_storage_manager_delegate.h",
- "core/live_tab.cc",
- "core/live_tab.h",
- "core/live_tab_context.h",
- "core/serialized_navigation_driver.h",
- "core/serialized_navigation_entry.cc",
- "core/serialized_navigation_entry.h",
- "core/serialized_user_agent_override.cc",
- "core/serialized_user_agent_override.h",
- "core/session_command.cc",
- "core/session_command.h",
- "core/session_constants.cc",
- "core/session_constants.h",
- "core/session_service_commands.cc",
- "core/session_service_commands.h",
- "core/session_types.cc",
- "core/session_types.h",
- "core/tab_restore_service.cc",
- "core/tab_restore_service.h",
- "core/tab_restore_service_client.cc",
- "core/tab_restore_service_client.h",
- "core/tab_restore_service_helper.cc",
- "core/tab_restore_service_helper.h",
- "core/tab_restore_service_impl.cc",
- "core/tab_restore_service_impl.h",
- "core/tab_restore_service_observer.h",
- ]
- configs += [ ":implementation" ]
- public_deps = [
- ":session_id",
- "//build:chromeos_buildflags",
- "//components/keyed_service/core",
- "//skia",
- ]
- deps = [
- "//base",
- "//components/dom_distiller/core",
- "//components/history/core/common",
- "//components/keyed_service/core",
- "//components/prefs",
- "//components/tab_groups",
- "//components/variations",
- "//crypto",
- "//skia",
- "//ui/base",
- "//ui/gfx",
- "//url",
- ]
- }
- static_library("test_support") {
- testonly = true
- sources = [
- "core/command_storage_manager_test_helper.cc",
- "core/command_storage_manager_test_helper.h",
- "core/serialized_navigation_entry_test_helper.cc",
- "core/serialized_navigation_entry_test_helper.h",
- ]
- public_deps = [ ":sessions" ]
- deps = [
- "//base",
- "//base/test:test_support",
- "//skia",
- "//testing/gtest",
- "//ui/base", # For page_transition_types.h.
- "//url",
- ]
- if (!is_ios) {
- sources += [
- "content/content_test_helper.cc",
- "content/content_test_helper.h",
- ]
- deps += [
- "//content/public/browser",
- "//content/public/common",
- ]
- }
- }
- source_set("unit_tests") {
- testonly = true
- sources = [
- "core/command_storage_backend_unittest.cc",
- "core/command_storage_manager_unittest.cc",
- "core/serialized_navigation_entry_unittest.cc",
- "core/session_id_generator_unittest.cc",
- ]
- if (!is_ios) {
- sources += [
- "content/content_serialized_navigation_builder_unittest.cc",
- "content/content_serialized_navigation_driver_unittest.cc",
- "content/navigation_task_id_unittest.cc",
- ]
- } else {
- sources += [
- "ios/ios_serialized_navigation_builder_unittest.mm",
- "ios/ios_serialized_navigation_driver_unittest.cc",
- ]
- configs += [ "//build/config/compiler:enable_arc" ]
- }
- public_deps = [ ":sessions" ]
- deps = [
- ":test_support",
- ":unit_tests_bundle_data",
- "//base/test:test_support",
- "//components/prefs:test_support",
- "//testing/gmock",
- "//testing/gtest",
- "//ui/base", # For page transition types.
- "//url",
- ]
- if (!is_ios) {
- deps += [
- "//content/public/common",
- "//content/test:test_support",
- ]
- } else {
- deps += [
- "//ios/web/public/test",
- "//ios/web/public/test:test_fixture",
- ]
- }
- }
- bundle_data("unit_tests_bundle_data") {
- visibility = [ ":unit_tests" ]
- testonly = true
- sources = [ "//components/test/data/sessions/last_session" ]
- outputs = [ "{{bundle_resources_dir}}/" +
- "{{source_root_relative_dir}}/{{source_file_part}}" ]
- }
|