naiveproxy/components/sessions/BUILD.gn

198 lines
4.6 KiB
Plaintext
Raw Normal View History

2018-08-11 08:35:24 +03:00
# 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",
]
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") {
sources = [
"ios/ios_live_tab.h",
"ios/ios_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",
]
public_deps = [
":shared",
"//ios/web",
]
deps = [
"//base",
]
}
}
# Sources shared between the content and iOS implementations.
source_set("shared") {
visibility = [ ":*" ]
sources = [
"core/base_session_service.cc",
"core/base_session_service.h",
"core/base_session_service_commands.cc",
"core/base_session_service_commands.h",
"core/base_session_service_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/session_backend.cc",
"core/session_backend.h",
"core/session_command.cc",
"core/session_command.h",
"core/session_constants.cc",
"core/session_constants.h",
"core/session_id.cc",
"core/session_id.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_observer.h",
]
if (is_android) {
sources += [
"core/in_memory_tab_restore_service.cc",
"core/in_memory_tab_restore_service.h",
]
} else {
sources += [
"core/persistent_tab_restore_service.cc",
"core/persistent_tab_restore_service.h",
]
}
configs += [ ":implementation" ]
public_deps = [
"//components/keyed_service/core",
"//components/sync/protocol",
]
deps = [
"//base",
"//components/keyed_service/core",
"//components/sync",
"//components/variations",
"//skia",
"//ui/base",
"//ui/gfx",
"//url",
]
}
static_library("test_support") {
testonly = true
sources = [
"core/serialized_navigation_entry_test_helper.cc",
"core/serialized_navigation_entry_test_helper.h",
]
public_deps = [
":sessions",
]
deps = [
"//base",
"//components/sync",
"//skia",
"//testing/gtest",
"//ui/base", # For page_transition_types.h.
"//url",
]
if (!is_android && !is_ios) {
sources += [
"core/base_session_service_test_helper.cc",
"core/base_session_service_test_helper.h",
]
}
}
source_set("unit_tests") {
if (is_ios) {
configs += [ "//build/config/compiler:enable_arc" ]
}
testonly = true
sources = [
"core/serialized_navigation_entry_unittest.cc",
"core/session_backend_unittest.cc",
"core/session_types_unittest.cc",
"ios/ios_serialized_navigation_builder_unittest.mm",
"ios/ios_serialized_navigation_driver_unittest.cc",
]
if (!is_ios) {
sources += [
"content/content_serialized_navigation_builder_unittest.cc",
"content/content_serialized_navigation_driver_unittest.cc",
]
}
public_deps = [
":sessions",
]
deps = [
":test_support",
"//base/test:test_support",
"//components/sync",
"//testing/gtest",
"//ui/base", # For page transition types.
"//url",
]
if (!is_ios) {
deps += [ "//content/public/common" ]
}
}