blob: 5ec556c3e16b343f3fc511bbb2d9e5c873e52fc9 [file] [log] [blame]
[email protected]ce9926c2014-07-16 21:41:511# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5if (is_android) {
James Robinson2ed4d692014-09-17 05:20:586 import("//build/config/android/config.gni")
[email protected]ce9926c2014-07-16 21:41:517}
8
brettwa22cb3b2015-04-30 20:23:129config("implementation") {
10 defines = [ "SESSIONS_IMPLEMENTATION" ]
11}
12
13if (!is_ios) {
brettwa22cb3b2015-04-30 20:23:1214 component("sessions") {
15 sources = [
blundell80c5b2a02015-09-17 18:22:1216 "content/content_live_tab.cc",
17 "content/content_live_tab.h",
blundell579e373e2015-09-22 07:04:4318 "content/content_platform_specific_tab_data.cc",
19 "content/content_platform_specific_tab_data.h",
nparkere8407d32016-08-30 04:09:4220 "content/content_record_password_state.cc",
21 "content/content_record_password_state.h",
brettwa22cb3b2015-04-30 20:23:1222 "content/content_serialized_navigation_builder.cc",
23 "content/content_serialized_navigation_builder.h",
24 "content/content_serialized_navigation_driver.cc",
25 "content/content_serialized_navigation_driver.h",
jianlif62ca6f2016-10-03 21:38:2326 "content/extended_info_handler.h",
brettwa22cb3b2015-04-30 20:23:1227 ]
28
29 configs += [ ":implementation" ]
30
tfarinac312b422015-07-21 18:17:5231 public_deps = [
32 ":shared",
blundell579e373e2015-09-22 07:04:4333 "//content/public/browser",
tfarinac312b422015-07-21 18:17:5234 ]
35
brettwa22cb3b2015-04-30 20:23:1236 deps = [
brettwa22cb3b2015-04-30 20:23:1237 "//base",
38 "//base/third_party/dynamic_annotations",
brettw6315e032015-11-27 18:38:3639 "//content/public/common",
brettwa22cb3b2015-04-30 20:23:1240 "//ui/base",
41 "//url",
42 ]
43 }
44} else {
45 source_set("sessions") {
46 sources = [
blundell1529bc82015-09-28 19:19:4947 "ios/ios_live_tab.h",
sdefresnee2920252016-02-16 16:37:3648 "ios/ios_live_tab.mm",
brettwa22cb3b2015-04-30 20:23:1249 "ios/ios_serialized_navigation_builder.h",
sdefresnee131ae82016-02-16 16:08:2450 "ios/ios_serialized_navigation_builder.mm",
brettwa22cb3b2015-04-30 20:23:1251 "ios/ios_serialized_navigation_driver.cc",
52 "ios/ios_serialized_navigation_driver.h",
53 ]
54
tfarinac312b422015-07-21 18:17:5255 public_deps = [
56 ":shared",
dprankea8d2fb92015-10-28 22:25:2357 "//ios/web",
tfarinac312b422015-07-21 18:17:5258 ]
59
brettwa22cb3b2015-04-30 20:23:1260 deps = [
brettwa22cb3b2015-04-30 20:23:1261 "//base",
brettwa22cb3b2015-04-30 20:23:1262 ]
63 }
64}
65
66# Sources shared between the content and iOS implementations.
67source_set("shared") {
kelvinpcc83d2d2015-07-17 17:15:1368 visibility = [ ":*" ]
69
[email protected]ce9926c2014-07-16 21:41:5170 sources = [
blundell47c6d8a2015-09-24 11:06:4071 "core/base_session_service.cc",
72 "core/base_session_service.h",
73 "core/base_session_service_commands.cc",
74 "core/base_session_service_commands.h",
75 "core/base_session_service_delegate.h",
blundell579e373e2015-09-22 07:04:4376 "core/live_tab.cc",
blundell80c5b2a02015-09-17 18:22:1277 "core/live_tab.h",
blundellbde024d2015-09-30 13:47:0778 "core/live_tab_context.h",
rohitrao74b46fe2014-10-22 21:07:5779 "core/serialized_navigation_driver.h",
blundell47c6d8a2015-09-24 11:06:4080 "core/serialized_navigation_entry.cc",
81 "core/serialized_navigation_entry.h",
82 "core/session_backend.cc",
83 "core/session_backend.h",
84 "core/session_command.cc",
85 "core/session_command.h",
blundell56789fe2015-09-10 05:11:1686 "core/session_constants.cc",
87 "core/session_constants.h",
blundell47c6d8a2015-09-24 11:06:4088 "core/session_id.cc",
89 "core/session_id.h",
90 "core/session_service_commands.cc",
91 "core/session_service_commands.h",
92 "core/session_types.cc",
93 "core/session_types.h",
blundella08c5dd2015-09-18 06:14:1694 "core/tab_restore_service.cc",
95 "core/tab_restore_service.h",
blundell7f80ba12015-09-17 08:05:5796 "core/tab_restore_service_client.cc",
blundell56789fe2015-09-10 05:11:1697 "core/tab_restore_service_client.h",
blundella08c5dd2015-09-18 06:14:1698 "core/tab_restore_service_helper.cc",
99 "core/tab_restore_service_helper.h",
100 "core/tab_restore_service_observer.h",
[email protected]ce9926c2014-07-16 21:41:51101 ]
102
blundella08c5dd2015-09-18 06:14:16103 if (is_android) {
104 sources += [
105 "core/in_memory_tab_restore_service.cc",
106 "core/in_memory_tab_restore_service.h",
107 ]
108 } else {
109 sources += [
110 "core/persistent_tab_restore_service.cc",
111 "core/persistent_tab_restore_service.h",
112 ]
113 }
114
brettwa22cb3b2015-04-30 20:23:12115 configs += [ ":implementation" ]
[email protected]ce9926c2014-07-16 21:41:51116
blundell579e373e2015-09-22 07:04:43117 public_deps = [
118 "//components/keyed_service/core",
Max Boguefef332d2016-07-28 22:09:09119 "//components/sync/protocol",
blundell579e373e2015-09-22 07:04:43120 ]
121
[email protected]ce9926c2014-07-16 21:41:51122 deps = [
123 "//base",
blundell930d9fd92015-12-03 11:39:03124 "//components/keyed_service/core",
Max Boguefef332d2016-07-28 22:09:09125 "//components/sync",
brettw6315e032015-11-27 18:38:36126 "//components/variations",
[email protected]ce9926c2014-07-16 21:41:51127 "//skia",
Sylvain Defresnec6ccc77d2014-09-19 10:19:35128 "//ui/base",
skuhneb7409dcf2014-11-14 04:06:55129 "//ui/gfx",
[email protected]ce9926c2014-07-16 21:41:51130 "//url",
131 ]
[email protected]ce9926c2014-07-16 21:41:51132}
133
brettw2dbbe5b02016-07-14 19:38:57134static_library("test_support") {
Brett Wilson0c8745a2014-09-08 22:59:49135 testonly = true
[email protected]ce9926c2014-07-16 21:41:51136 sources = [
blundell47c6d8a2015-09-24 11:06:40137 "core/serialized_navigation_entry_test_helper.cc",
138 "core/serialized_navigation_entry_test_helper.h",
[email protected]ce9926c2014-07-16 21:41:51139 ]
140
brettwa22cb3b2015-04-30 20:23:12141 public_deps = [
142 ":sessions",
143 ]
[email protected]ce9926c2014-07-16 21:41:51144 deps = [
brettw6315e032015-11-27 18:38:36145 "//base",
Max Boguefef332d2016-07-28 22:09:09146 "//components/sync",
[email protected]ce9926c2014-07-16 21:41:51147 "//skia",
148 "//testing/gtest",
brettw6315e032015-11-27 18:38:36149 "//ui/base", # For page_transition_types.h.
150 "//url",
[email protected]ce9926c2014-07-16 21:41:51151 ]
152
skuhnef0d3eac2014-11-15 05:14:19153 if (!is_android && !is_ios) {
154 sources += [
blundell47c6d8a2015-09-24 11:06:40155 "core/base_session_service_test_helper.cc",
156 "core/base_session_service_test_helper.h",
skuhnef0d3eac2014-11-15 05:14:19157 ]
158 }
[email protected]ce9926c2014-07-16 21:41:51159}
rohitrao2975885b2014-10-24 19:00:27160
pkotwicz59272082015-10-29 19:29:14161source_set("unit_tests") {
marqeabc52212017-06-15 09:37:34162 if (is_ios) {
163 configs += [ "//build/config/compiler:enable_arc" ]
164 }
pkotwicz59272082015-10-29 19:29:14165 testonly = true
166 sources = [
167 "core/serialized_navigation_entry_unittest.cc",
168 "core/session_backend_unittest.cc",
169 "core/session_types_unittest.cc",
sdefresnee131ae82016-02-16 16:08:24170 "ios/ios_serialized_navigation_builder_unittest.mm",
pkotwicz59272082015-10-29 19:29:14171 "ios/ios_serialized_navigation_driver_unittest.cc",
172 ]
dprankea8d2fb92015-10-28 22:25:23173
pkotwicz59272082015-10-29 19:29:14174 if (!is_ios) {
175 sources += [
176 "content/content_serialized_navigation_builder_unittest.cc",
177 "content/content_serialized_navigation_driver_unittest.cc",
skuhneb7409dcf2014-11-14 04:06:55178 ]
179 }
pkotwicz59272082015-10-29 19:29:14180
181 public_deps = [
182 ":sessions",
183 ]
184
185 deps = [
186 ":test_support",
187 "//base/test:test_support",
Max Boguefef332d2016-07-28 22:09:09188 "//components/sync",
pkotwicz59272082015-10-29 19:29:14189 "//testing/gtest",
brettw6315e032015-11-27 18:38:36190 "//ui/base", # For page transition types.
191 "//url",
pkotwicz59272082015-10-29 19:29:14192 ]
dpranked43eab42015-12-15 23:10:44193
194 if (!is_ios) {
195 deps += [ "//content/public/common" ]
196 }
skuhneb7409dcf2014-11-14 04:06:55197}