Use common code to set HttpNetworkSession::Param pointers.
[chromium-blink-merge.git] / components / gcm_driver.gypi
blob5bd7aebca536ab28dc55aabc41fd8db1262bc322
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.
6   'targets': [
7     {
8       # GN version: //components/gcm_driver/common
9       'target_name': 'gcm_driver_common',
10       'type': '<(component)',
11       'include_dirs': [
12         '..',
13       ],
14       'defines': [
15         'GCM_DRIVER_IMPLEMENTATION',
16       ],
17       'sources': [
18          # Note: file list duplicated in GN build.
19         'gcm_driver/common/gcm_driver_export.h',
20         'gcm_driver/common/gcm_messages.cc',
21         'gcm_driver/common/gcm_messages.h',
22       ],
23     },
24     {
25       # GN version: //components/gcm_driver
26       'target_name': 'gcm_driver',
27       'type': 'static_library',
28       'dependencies': [
29         'gcm_driver_common',
30         'gcm_driver_crypto',
31         'os_crypt',
32         '../base/base.gyp:base',
33         '../google_apis/gcm/gcm.gyp:gcm',
34         '../net/net.gyp:net',
35         '../sync/sync.gyp:sync_proto',
36       ],
37       'include_dirs': [
38         '..',
39       ],
40       'sources': [
41          # Note: file list duplicated in GN build.
42         'gcm_driver/android/component_jni_registrar.cc',
43         'gcm_driver/android/component_jni_registrar.h',
44         'gcm_driver/default_gcm_app_handler.cc',
45         'gcm_driver/default_gcm_app_handler.h',
46         'gcm_driver/gcm_account_mapper.cc',
47         'gcm_driver/gcm_account_mapper.h',
48         'gcm_driver/gcm_account_tracker.cc',
49         'gcm_driver/gcm_account_tracker.h',
50         'gcm_driver/gcm_activity.cc',
51         'gcm_driver/gcm_activity.h',
52         'gcm_driver/gcm_app_handler.cc',
53         'gcm_driver/gcm_app_handler.h',
54         'gcm_driver/gcm_backoff_policy.cc',
55         'gcm_driver/gcm_backoff_policy.h',
56         'gcm_driver/gcm_channel_status_request.cc',
57         'gcm_driver/gcm_channel_status_request.h',
58         'gcm_driver/gcm_channel_status_syncer.cc',
59         'gcm_driver/gcm_channel_status_syncer.h',
60         'gcm_driver/gcm_client.cc',
61         'gcm_driver/gcm_client.h',
62         'gcm_driver/gcm_client_factory.cc',
63         'gcm_driver/gcm_client_factory.h',
64         'gcm_driver/gcm_client_impl.cc',
65         'gcm_driver/gcm_client_impl.h',
66         'gcm_driver/gcm_connection_observer.cc',
67         'gcm_driver/gcm_connection_observer.h',
68         'gcm_driver/gcm_delayed_task_controller.cc',
69         'gcm_driver/gcm_delayed_task_controller.h',
70         'gcm_driver/gcm_driver.cc',
71         'gcm_driver/gcm_driver.h',
72         'gcm_driver/gcm_driver_android.cc',
73         'gcm_driver/gcm_driver_android.h',
74         'gcm_driver/gcm_driver_desktop.cc',
75         'gcm_driver/gcm_driver_desktop.h',
76         'gcm_driver/gcm_stats_recorder_impl.cc',
77         'gcm_driver/gcm_stats_recorder_impl.h',
78         'gcm_driver/registration_info.cc',
79         'gcm_driver/registration_info.h',
80         'gcm_driver/system_encryptor.cc',
81         'gcm_driver/system_encryptor.h',
82       ],
83       'conditions': [
84         ['OS == "android"', {
85           'dependencies': [
86             'gcm_driver_jni_headers',
87           ],
88           'dependencies!': [
89             '../google_apis/gcm/gcm.gyp:gcm',
90           ],
91           'sources!': [
92             'gcm_driver/gcm_account_mapper.cc',
93             'gcm_driver/gcm_account_mapper.h',
94             'gcm_driver/gcm_channel_status_request.cc',
95             'gcm_driver/gcm_channel_status_request.h',
96             'gcm_driver/gcm_channel_status_syncer.cc',
97             'gcm_driver/gcm_channel_status_syncer.h',
98             'gcm_driver/gcm_client_factory.cc',
99             'gcm_driver/gcm_client_factory.h',
100             'gcm_driver/gcm_client_impl.cc',
101             'gcm_driver/gcm_client_impl.h',
102             'gcm_driver/gcm_driver_desktop.cc',
103             'gcm_driver/gcm_driver_desktop.h',
104             'gcm_driver/gcm_stats_recorder_impl.cc',
105             'gcm_driver/gcm_stats_recorder_impl.h',
106           ],
107         }],
108         ['chromeos == 1', {
109           'dependencies': [
110             'timers',
111           ],
112         }],
113       ],
114     },
115     {
116       # GN version: //components/gcm_driver:test_support
117       'target_name': 'gcm_driver_test_support',
118       'type': 'static_library',
119       'dependencies': [
120         'gcm_driver',
121         '../base/base.gyp:base',
122         '../google_apis/gcm/gcm.gyp:gcm_test_support',
123         '../testing/gtest.gyp:gtest',
124       ],
125       'include_dirs': [
126         '..',
127       ],
128       'sources': [
129         # Note: file list duplicated in GN build.
130         'gcm_driver/fake_gcm_app_handler.cc',
131         'gcm_driver/fake_gcm_app_handler.h',
132         'gcm_driver/fake_gcm_client.cc',
133         'gcm_driver/fake_gcm_client.h',
134         'gcm_driver/fake_gcm_client_factory.cc',
135         'gcm_driver/fake_gcm_client_factory.h',
136         'gcm_driver/fake_gcm_driver.cc',
137         'gcm_driver/fake_gcm_driver.h',
138       ],
139       'conditions': [
140         ['OS == "android"', {
141           'dependencies!': [
142             '../google_apis/gcm/gcm.gyp:gcm_test_support',
143           ],
144           'sources!': [
145             'gcm_driver/fake_gcm_client.cc',
146             'gcm_driver/fake_gcm_client.h',
147             'gcm_driver/fake_gcm_client_factory.cc',
148             'gcm_driver/fake_gcm_client_factory.h',
149           ],
150         }],
151       ],
152     },
153     {
154       # GN version: //components/gcm_driver/instance_id
155       'target_name': 'instance_id',
156       'type': 'static_library',
157       'include_dirs': [
158         '..',
159       ],
160       'sources': [
161         # Note: file list duplicated in GN build.
162         'gcm_driver/instance_id/instance_id.cc',
163         'gcm_driver/instance_id/instance_id.h',
164         'gcm_driver/instance_id/instance_id_android.cc',
165         'gcm_driver/instance_id/instance_id_android.h',
166         'gcm_driver/instance_id/instance_id_driver.cc',
167         'gcm_driver/instance_id/instance_id_driver.h',
168         'gcm_driver/instance_id/instance_id_impl.cc',
169         'gcm_driver/instance_id/instance_id_impl.h',
170       ],
171       'conditions': [
172         ['OS == "android"', {
173           'sources!': [
174             'gcm_driver/instance_id/instance_id_impl.cc',
175             'gcm_driver/instance_id/instance_id_impl.h',
176           ],
177         }],
178       ],
179     },
180     {
181       # GN version: //components/gcm_driver/instance_id:test_support
182       'target_name': 'instance_id_test_support',
183       'type': 'static_library',
184       'dependencies': [
185         'gcm_driver_test_support',
186         'instance_id',
187         '../testing/gtest.gyp:gtest',
188       ],
189       'include_dirs': [
190         '..',
191       ],
192       'sources': [
193         # Note: file list duplicated in GN build.
194         'gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc',
195         'gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h',
196       ],
197     },
198     {
199       # GN version: //components/gcm_driver/crypto
200       'target_name': 'gcm_driver_crypto',
201       'type': 'static_library',
202       'dependencies': [
203         'gcm_driver_crypto_proto',
204         '../base/base.gyp:base',
205         '../components/components.gyp:leveldb_proto',
206         '../crypto/crypto.gyp:crypto',
207       ],
208       'include_dirs': [
209         '..',
210       ],
211       'sources': [
212         # Note: file list duplicated in GN build.
213         'gcm_driver/crypto/gcm_encryption_provider.cc',
214         'gcm_driver/crypto/gcm_encryption_provider.h',
215         'gcm_driver/crypto/gcm_key_store.cc',
216         'gcm_driver/crypto/gcm_key_store.h',
217         'gcm_driver/crypto/gcm_message_cryptographer.cc',
218         'gcm_driver/crypto/gcm_message_cryptographer.h',
219         'gcm_driver/crypto/gcm_message_cryptographer_nss.cc',
220         'gcm_driver/crypto/gcm_message_cryptographer_openssl.cc',
221       ],
222       'conditions': [
223         ['use_openssl==1', {
224           'sources!': [
225             'gcm_driver/crypto/gcm_message_cryptographer_nss.cc',
226           ],
227           'dependencies': [
228             '../third_party/boringssl/boringssl.gyp:boringssl',
229           ],
230         }, {
231           'sources!': [
232             'gcm_driver/crypto/gcm_message_cryptographer_openssl.cc',
233           ],
234         }],
235       ],
236     },
237     {
238       # GN version: //components/gcm_driver/crypto/proto
239       'target_name': 'gcm_driver_crypto_proto',
240       'type': 'static_library',
241       'sources': [
242         'gcm_driver/crypto/proto/gcm_encryption_data.proto',
243       ],
244       'variables': {
245         'proto_in_dir': 'gcm_driver/crypto/proto',
246         'proto_out_dir': 'components/gcm_driver/crypto/proto',
247       },
248       'includes': [ '../build/protoc.gypi' ],
249     },
250   ],
251   'conditions': [
252     ['OS == "android"', {
253       'targets': [
254         {
255           # GN version: //components/gcm_driver/android:gcm_driver_java
256           'target_name': 'gcm_driver_java',
257           'type': 'none',
258           'dependencies': [
259             '../base/base.gyp:base',
260             # TODO(johnme): Fix the layering violation of depending on content/
261             '../content/content.gyp:content_java',
262             '../sync/sync.gyp:sync_java',
263           ],
264           'variables': {
265             'java_in_dir': 'gcm_driver/android/java',
266           },
267           'includes': [ '../build/java.gypi' ],
268         },
269         {
270           # GN version: //components/gcm_driver/android:jni_headers
271           'target_name': 'gcm_driver_jni_headers',
272           'type': 'none',
273           'sources': [
274             'gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java',
275           ],
276           'variables': {
277             'jni_gen_package': 'components/gcm_driver',
278           },
279           'includes': [ '../build/jni_generator.gypi' ],
280         },
281       ],
282      },
283     ],
284   ],