Cleanup: Only build extensions renderer code when extensions are enabled.
[chromium-blink-merge.git] / components / gcm_driver.gypi
blob1e9559f4ee42a5032dd8a5e7b3c56f101766ac64
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
9       'target_name': 'gcm_driver',
10       'type': 'static_library',
11       'dependencies': [
12         'os_crypt',
13         '../base/base.gyp:base',
14         '../google_apis/gcm/gcm.gyp:gcm',
15         '../net/net.gyp:net',
16       ],
17       'include_dirs': [
18         '..',
19       ],
20       'sources': [
21          # Note: file list duplicated in GN build.
22         'gcm_driver/android/component_jni_registrar.cc',
23         'gcm_driver/android/component_jni_registrar.h',
24         'gcm_driver/default_gcm_app_handler.cc',
25         'gcm_driver/default_gcm_app_handler.h',
26         'gcm_driver/gcm_account_mapper.cc',
27         'gcm_driver/gcm_account_mapper.h',
28         'gcm_driver/gcm_activity.cc',
29         'gcm_driver/gcm_activity.h',
30         'gcm_driver/gcm_app_handler.cc',
31         'gcm_driver/gcm_app_handler.h',
32         'gcm_driver/gcm_backoff_policy.cc',
33         'gcm_driver/gcm_backoff_policy.h',
34         'gcm_driver/gcm_channel_status_request.cc',
35         'gcm_driver/gcm_channel_status_request.h',
36         'gcm_driver/gcm_client.cc',
37         'gcm_driver/gcm_client.h',
38         'gcm_driver/gcm_client_factory.cc',
39         'gcm_driver/gcm_client_factory.h',
40         'gcm_driver/gcm_client_impl.cc',
41         'gcm_driver/gcm_client_impl.h',
42         'gcm_driver/gcm_connection_observer.cc',
43         'gcm_driver/gcm_connection_observer.h',
44         'gcm_driver/gcm_delayed_task_controller.cc',
45         'gcm_driver/gcm_delayed_task_controller.h',
46         'gcm_driver/gcm_driver.cc',
47         'gcm_driver/gcm_driver.h',
48         'gcm_driver/gcm_driver_android.cc',
49         'gcm_driver/gcm_driver_android.h',
50         'gcm_driver/gcm_driver_desktop.cc',
51         'gcm_driver/gcm_driver_desktop.h',
52         'gcm_driver/gcm_stats_recorder_impl.cc',
53         'gcm_driver/gcm_stats_recorder_impl.h',
54         'gcm_driver/proto/gcm_channel_status.proto',
55         'gcm_driver/system_encryptor.cc',
56         'gcm_driver/system_encryptor.h',
57       ],
58       'variables': {
59         'proto_in_dir': 'gcm_driver/proto',
60         'proto_out_dir': 'components/gcm_driver/proto',
61       },
62       'includes': [ '../build/protoc.gypi' ],
63       'conditions': [
64         ['OS == "android"', {
65           'dependencies': [
66             'gcm_driver_jni_headers',
67           ],
68           'dependencies!': [
69             '../google_apis/gcm/gcm.gyp:gcm',
70           ],
71           'sources!': [
72             'gcm_driver/gcm_account_mapper.cc',
73             'gcm_driver/gcm_account_mapper.h',
74             'gcm_driver/gcm_channel_status_request.cc',
75             'gcm_driver/gcm_channel_status_request.h',
76             'gcm_driver/gcm_client_factory.cc',
77             'gcm_driver/gcm_client_factory.h',
78             'gcm_driver/gcm_client_impl.cc',
79             'gcm_driver/gcm_client_impl.h',
80             'gcm_driver/gcm_delayed_task_controller.cc',
81             'gcm_driver/gcm_delayed_task_controller.h',
82             'gcm_driver/gcm_driver_desktop.cc',
83             'gcm_driver/gcm_driver_desktop.h',
84             'gcm_driver/gcm_stats_recorder_impl.cc',
85             'gcm_driver/gcm_stats_recorder_impl.h',
86             'gcm_driver/proto/gcm_channel_status.proto',
87           ],
88         }],
89       ],
90     },
91     {
92       # GN version: //components/gcm_driver:test_support
93       'target_name': 'gcm_driver_test_support',
94       'type': 'static_library',
95       'dependencies': [
96         'gcm_driver',
97         '../base/base.gyp:base',
98         '../google_apis/gcm/gcm.gyp:gcm_test_support',
99         '../testing/gtest.gyp:gtest',
100       ],
101       'include_dirs': [
102         '..',
103       ],
104       'sources': [
105         # Note: file list duplicated in GN build.
106         'gcm_driver/fake_gcm_app_handler.cc',
107         'gcm_driver/fake_gcm_app_handler.h',
108         'gcm_driver/fake_gcm_client.cc',
109         'gcm_driver/fake_gcm_client.h',
110         'gcm_driver/fake_gcm_client_factory.cc',
111         'gcm_driver/fake_gcm_client_factory.h',
112         'gcm_driver/fake_gcm_driver.cc',
113         'gcm_driver/fake_gcm_driver.h',
114       ],
115       'conditions': [
116         ['OS == "android"', {
117           'dependencies!': [
118             '../google_apis/gcm/gcm.gyp:gcm_test_support',
119           ],
120           'sources!': [
121             'gcm_driver/fake_gcm_client.cc',
122             'gcm_driver/fake_gcm_client.h',
123             'gcm_driver/fake_gcm_client_factory.cc',
124             'gcm_driver/fake_gcm_client_factory.h',
125           ],
126         }],
127       ],
128     },
129   ],
130   'conditions': [
131     ['OS == "android"', {
132       'targets': [
133         {
134           'target_name': 'gcm_driver_java',
135           'type': 'none',
136           'dependencies': [
137             '../base/base.gyp:base',
138             # TODO(johnme): Fix the layering violation of depending on content/
139             '../content/content.gyp:content_java',
140             '../sync/sync.gyp:sync_java',
141           ],
142           'variables': {
143             'java_in_dir': 'gcm_driver/android/java',
144           },
145           'includes': [ '../build/java.gypi' ],
146         },
147         {
148           'target_name': 'gcm_driver_jni_headers',
149           'type': 'none',
150           'sources': [
151             'gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java',
152           ],
153           'variables': {
154             'jni_gen_package': 'components/gcm_driver',
155           },
156           'includes': [ '../build/jni_generator.gypi' ],
157         },
158       ],
159      },
160     ],
161   ],