Forward accessibility events to the automation extension process.
[chromium-blink-merge.git] / components / invalidation / BUILD.gn
blob7fa7b8777024203528a7210c48cedecd25cd0c55
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.
4 if (is_android) {
5   import("//build/config/android/rules.gni")
8 static_library("invalidation") {
9   sources = [
10     "ack_handle.cc",
11     "ack_handle.h",
12     "ack_handler.cc",
13     "ack_handler.h",
14     "invalidation.cc",
15     "invalidation.h",
16     "invalidation_handler.cc",
17     "invalidation_handler.h",
18     "invalidation_logger.cc",
19     "invalidation_logger.h",
20     "invalidation_logger_observer.h",
21     "invalidation_prefs.cc",
22     "invalidation_prefs.h",
23     "invalidation_service.h",
24     "invalidation_service_util.cc",
25     "invalidation_service_util.h",
26     "invalidation_state_tracker.cc",
27     "invalidation_state_tracker.h",
28     "invalidation_switches.cc",
29     "invalidation_switches.h",
30     "invalidation_util.cc",
31     "invalidation_util.h",
32     "invalidator.cc",
33     "invalidator.h",
34     "invalidator_registrar.cc",
35     "invalidator_registrar.h",
36     "invalidator_state.cc",
37     "invalidator_state.h",
38     "invalidator_storage.cc",
39     "invalidator_storage.h",
40     "mock_ack_handler.cc",
41     "mock_ack_handler.h",
42     "object_id_invalidation_map.cc",
43     "object_id_invalidation_map.h",
44     "profile_invalidation_provider.cc",
45     "profile_invalidation_provider.h",
46     "single_object_invalidation_set.cc",
47     "single_object_invalidation_set.h",
48     "unacked_invalidation_set.cc",
49     "unacked_invalidation_set.h",
50   ]
51   if (!is_android) {
52     sources += [
53       "gcm_invalidation_bridge.cc",
54       "gcm_invalidation_bridge.h",
55       "gcm_network_channel.cc",
56       "gcm_network_channel.h",
57       "gcm_network_channel_delegate.h",
58       "invalidation_notifier.cc",
59       "invalidation_notifier.h",
60       "non_blocking_invalidator.cc",
61       "non_blocking_invalidator.h",
62       "notifier_reason_util.cc",
63       "notifier_reason_util.h",
64       "p2p_invalidator.cc",
65       "p2p_invalidator.h",
66       "push_client_channel.cc",
67       "push_client_channel.h",
68       "registration_manager.cc",
69       "registration_manager.h",
70       "state_writer.h",
71       "sync_invalidation_listener.cc",
72       "sync_invalidation_listener.h",
73       "sync_system_resources.cc",
74       "sync_system_resources.h",
75       "ticl_invalidation_service.cc",
76       "ticl_invalidation_service.h",
77       "ticl_settings_provider.cc",
78       "ticl_settings_provider.h",
79     ]
80   }
82   public_deps = [
83     "//third_party/cacheinvalidation",
84   ]
85   deps = [
86     "//base",
87     "//components/gcm_driver",
88     "//components/keyed_service/core",
89     "//components/pref_registry",
90     "//components/signin/core/browser",
91     "//google_apis",
92     "//jingle:notifier",
94     # TODO(sync): Remove this (http://crbug.com/133352);
95     "//third_party/protobuf:protobuf_lite",
97     # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
98   ]
100   if (is_android) {
101     sources += [
102       "android/component_jni_registrar.cc",
103       "android/component_jni_registrar.h",
104       "invalidation_service_android.cc",
105       "invalidation_service_android.h",
106     ]
107     deps += [ ":jni_headers" ]
108   }
111 group("unittests") {
112   testonly = true
113   deps = [
114     ":invalidation",
115     ":test_support",
116   ]
117   if (is_android) {
118     deps += [ ":jni_headers" ]
119   }
122 static_library("test_support") {
123   testonly = true
124   sources = [
125     "fake_invalidation_handler.cc",
126     "fake_invalidation_handler.h",
127     "fake_invalidation_state_tracker.cc",
128     "fake_invalidation_state_tracker.h",
129     "fake_invalidator.cc",
130     "fake_invalidator.h",
131     "invalidation_service_test_template.cc",
132     "invalidation_service_test_template.h",
133     "invalidation_test_util.cc",
134     "invalidation_test_util.h",
135     "invalidator_test_template.cc",
136     "invalidator_test_template.h",
137     "object_id_invalidation_map_test_util.cc",
138     "object_id_invalidation_map_test_util.h",
139     "unacked_invalidation_set_test_util.cc",
140     "unacked_invalidation_set_test_util.h",
141   ]
143   deps = [
144     "//base",
145     "//components/gcm_driver:test_support",
146     "//components/keyed_service/core",
147     "//google_apis",
148     "//jingle:notifier",
149     "//jingle:notifier_test_util",
150     "//net",
151     "//testing/gmock",
152     "//third_party/cacheinvalidation",
154     # TODO(sync): Remove this (http://crbug.com/133352);
155     "//third_party/protobuf:protobuf_lite",
157     # "//third_party/cacheinvalidation/src/google/cacheinvalidation:cacheinvalidation_proto_cpp",
158   ]
160   if (is_android) {
161     deps += [ ":jni_headers" ]
162   } else {
163     sources += [
164       "p2p_invalidation_service.cc",
165       "p2p_invalidation_service.h",
166     ]
167   }
170 if (is_android) {
171   android_library("java") {
172     deps = [
173       ":proto_java",
174       "//base:base_java",
175       "//sync/android:sync_java",
176       "//third_party/android_protobuf:protobuf_nano_javalib",
177       "//third_party/cacheinvalidation:cacheinvalidation_javalib",
178       "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
179       "//third_party/jsr-305:jsr_305_javalib",
180     ]
181     DEPRECATED_java_in_dir = "android/java/src"
182   }
183   proto_java_library("proto_java") {
184     proto_path = "android/proto"
185     sources = [
186       "$proto_path/serialized_invalidation.proto",
187     ]
188   }
189   android_library("javatests") {
190     deps = [
191       ":java",
192       "//base:base_java",
193       "//base:base_java_test_support",
194       "//sync/android:sync_java",
195       "//third_party/cacheinvalidation:cacheinvalidation_javalib",
196       "//third_party/cacheinvalidation:cacheinvalidation_proto_java",
197     ]
198     DEPRECATED_java_in_dir = "android/javatests/src"
199   }
200   junit_binary("junit_tests") {
201     java_files = [ "android/junit/src/org/chromium/components/invalidation/PendingInvalidationTest.java" ]
202     deps = [
203       ":java",
204       "//base:base_java",
205       "//base:base_java_test_support",
206     ]
207   }
208   generate_jni("jni_headers") {
209     sources = [
210       "android/java/src/org/chromium/components/invalidation/InvalidationService.java",
211     ]
212     jni_package = "components/invalidation"
213   }