Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / components / sessions / BUILD.gn
blobed2291e779b6fad6c646301f4a4ae79c62aaf0bb
1 # 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.
5 if (is_android) {
6   import("//build/config/android/config.gni")
9 config("implementation") {
10   defines = [ "SESSIONS_IMPLEMENTATION" ]
13 if (!is_ios) {
14   # GYP version: components/sessions.gypi:sessions_content
15   component("sessions") {
16     sources = [
17       "content/content_live_tab.cc",
18       "content/content_live_tab.h",
19       "content/content_platform_specific_tab_data.cc",
20       "content/content_platform_specific_tab_data.h",
21       "content/content_serialized_navigation_builder.cc",
22       "content/content_serialized_navigation_builder.h",
23       "content/content_serialized_navigation_driver.cc",
24       "content/content_serialized_navigation_driver.h",
25     ]
27     configs += [ ":implementation" ]
29     public_deps = [
30       ":shared",
31       "//content/public/browser",
32     ]
34     deps = [
35       "//base",
36       "//base/third_party/dynamic_annotations",
37       "//ui/base",
38       "//url",
39     ]
40   }
41 } else {
42   source_set("sessions") {
43     sources = [
44       "ios/ios_serialized_navigation_builder.cc",
45       "ios/ios_serialized_navigation_builder.h",
46       "ios/ios_serialized_navigation_driver.cc",
47       "ios/ios_serialized_navigation_driver.h",
48     ]
50     public_deps = [
51       ":shared",
52     ]
54     deps = [
55       "//base",
56       # '../ios/web/ios_web.gyp:ios_web',  TODO(GYP) iOS.
57     ]
58   }
61 # Sources shared between the content and iOS implementations.
62 source_set("shared") {
63   visibility = [ ":*" ]
65   sources = [
66     "base_session_service.cc",
67     "base_session_service.h",
68     "base_session_service_commands.cc",
69     "base_session_service_commands.h",
70     "base_session_service_delegate.h",
71     "core/live_tab.cc",
72     "core/live_tab.h",
73     "core/serialized_navigation_driver.h",
74     "core/session_constants.cc",
75     "core/session_constants.h",
76     "core/tab_restore_service.cc",
77     "core/tab_restore_service.h",
78     "core/tab_restore_service_client.cc",
79     "core/tab_restore_service_client.h",
80     "core/tab_restore_service_delegate.h",
81     "core/tab_restore_service_helper.cc",
82     "core/tab_restore_service_helper.h",
83     "core/tab_restore_service_observer.h",
84     "serialized_navigation_entry.cc",
85     "serialized_navigation_entry.h",
86     "session_backend.cc",
87     "session_backend.h",
88     "session_command.cc",
89     "session_command.h",
90     "session_id.cc",
91     "session_id.h",
92     "session_service_commands.cc",
93     "session_service_commands.h",
94     "session_types.cc",
95     "session_types.h",
96   ]
98   if (is_android) {
99     sources += [
100       "core/in_memory_tab_restore_service.cc",
101       "core/in_memory_tab_restore_service.h",
102     ]
103   } else {
104     sources += [
105       "core/persistent_tab_restore_service.cc",
106       "core/persistent_tab_restore_service.h",
107     ]
108   }
110   configs += [ ":implementation" ]
112   public_deps = [
113     "//components/keyed_service/core",
114     "//sync/protocol",
115   ]
117   deps = [
118     "//base",
119     "//skia",
120     "//sync",
121     "//ui/base",
122     "//ui/gfx",
123     "//url",
124   ]
127 source_set("test_support") {
128   testonly = true
129   sources = [
130     "serialized_navigation_entry_test_helper.cc",
131     "serialized_navigation_entry_test_helper.h",
132   ]
134   public_deps = [
135     ":sessions",
136   ]
137   deps = [
138     "//skia",
139     "//sync",
140     "//testing/gtest",
141   ]
143   if (!is_android && !is_ios) {
144     sources += [
145       "base_session_service_test_helper.cc",
146       "base_session_service_test_helper.h",
147     ]
148   }
151 if (!is_ios && !is_android) {
152   source_set("unit_tests") {
153     testonly = true
154     sources = [
155       "content/content_serialized_navigation_builder_unittest.cc",
156       "content/content_serialized_navigation_driver_unittest.cc",
157       "ios/ios_serialized_navigation_builder_unittest.cc",
158       "ios/ios_serialized_navigation_driver_unittest.cc",
159       "serialized_navigation_entry_unittest.cc",
160       "session_backend_unittest.cc",
161       "session_types_unittest.cc",
162     ]
163     deps = [
164       ":sessions",
165       ":test_support",
166       "//base/test:test_support",
167       "//testing/gtest",
168     ]
169   }