| # 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) { |
| # GYP version: components/sessions.gypi:sessions_content |
| component("sessions") { |
| sources = [ |
| "content/content_serialized_navigation_builder.cc", |
| "content/content_serialized_navigation_builder.h", |
| "content/content_serialized_navigation_driver.cc", |
| "content/content_serialized_navigation_driver.h", |
| ] |
| |
| configs += [ ":implementation" ] |
| |
| deps = [ |
| ":shared", |
| "//base", |
| "//base/third_party/dynamic_annotations", |
| "//content/public/browser", |
| "//ui/base", |
| "//url", |
| ] |
| } |
| } else { |
| source_set("sessions") { |
| sources = [ |
| "ios/ios_serialized_navigation_builder.cc", |
| "ios/ios_serialized_navigation_builder.h", |
| "ios/ios_serialized_navigation_driver.cc", |
| "ios/ios_serialized_navigation_driver.h", |
| ] |
| |
| deps = [ |
| ":shared", |
| "//base", |
| |
| # '../ios/web/ios_web.gyp:ios_web', TODO(GYP) iOS. |
| ] |
| } |
| } |
| |
| # Sources shared between the content and iOS implementations. |
| source_set("shared") { |
| visibility = [ ":*" ] |
| |
| sources = [ |
| "base_session_service.cc", |
| "base_session_service.h", |
| "base_session_service_commands.cc", |
| "base_session_service_commands.h", |
| "base_session_service_delegate.h", |
| "core/serialized_navigation_driver.h", |
| "serialized_navigation_entry.cc", |
| "serialized_navigation_entry.h", |
| "session_backend.cc", |
| "session_backend.h", |
| "session_command.cc", |
| "session_command.h", |
| "session_id.cc", |
| "session_id.h", |
| "session_service_commands.cc", |
| "session_service_commands.h", |
| "session_types.cc", |
| "session_types.h", |
| ] |
| |
| configs += [ ":implementation" ] |
| |
| deps = [ |
| "//base", |
| "//skia", |
| "//sync", |
| "//sync/protocol", |
| "//third_party/protobuf:protobuf_lite", |
| "//ui/base", |
| "//ui/gfx", |
| "//url", |
| ] |
| } |
| |
| source_set("test_support") { |
| testonly = true |
| sources = [ |
| "serialized_navigation_entry_test_helper.cc", |
| "serialized_navigation_entry_test_helper.h", |
| ] |
| |
| public_deps = [ |
| ":sessions", |
| ] |
| deps = [ |
| "//skia", |
| "//sync", |
| "//testing/gtest", |
| ] |
| |
| if (!is_android && !is_ios) { |
| sources += [ |
| "base_session_service_test_helper.cc", |
| "base_session_service_test_helper.h", |
| ] |
| } |
| } |
| |
| if (!is_ios && !is_android) { |
| source_set("unit_tests") { |
| testonly = true |
| sources = [ |
| "session_backend_unittest.cc", |
| "session_types_unittest.cc", |
| ] |
| deps = [ |
| ":sessions", |
| "//base/test:test_support", |
| "//testing/gtest", |
| "//third_party/protobuf:protobuf_lite", |
| ] |
| } |
| } |